XCode 4.2 SVN 问题

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7904939/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 22:14:13  来源:igfitidea点击:

XCode 4.2 SVN issues

xcodesvnhttps

提问by Stavash

I am having trouble connecting my project repository to XCode, ever since I've upgraded to 4.2. I have a local server with a forwarded port to be accessed from outside the local network. I have a DNS record pointing to the external ip. When I explicitly define the external ip (i.e https://123.456.789.000/svn/...) the repository is properly linked, no problems. This also works when I specify the internal address. The issue is when I use the repository dns - XCode shows a red dot with "Host Unreachable". I am sure this is an XCode 4.2 specific issue, because I tried this in other clients, including older XCode versions. The basic problem is - the external DNS doesn't work with https.
Any ideas?

自从我升级到 4.2 以来,我就无法将我的项目存储库连接到 XCode。我有一个带有转发端口的本地服务器,可以从本地网络外部访问。我有一个指向外部 IP 的 DNS 记录。当我明确定义外部 ip(即https://123.456.789.000/svn/..)时,存储库已正确链接,没有问题。当我指定内部地址时,这也有效。问题是当我使用存储库 dns 时 - XCode 显示一个带有“主机无法访问”的红点。我确定这是一个 XCode 4.2 特定问题,因为我在其他客户端(包括较旧的 XCode 版本)中尝试过这个问题。基本问题是 - 外部 DNS 不适用于 https。
有任何想法吗?

回答by xiig

None of the above worked for me BUT here is what worked:

以上都不适合我,但这里是有效的:

I continued to get the "untrusted certficate" error in xcode 4.2 -- i could see that a prompt is being presented as readonly in xcode

我继续在 xcode 4.2 中收到“不受信任的证书”错误——我可以看到提示在 xcode 中显示为只读

So, I accessed my svn server site from via the svn command prompt utility and did a dummy operation :

因此,我通过 svn 命令提示符实用程序访问了我的 svn 服务器站点并执行了一个虚拟操作:

svn co https://mysvnserver.com/project/

I saw the same error on the prompt as in xcode:

我在提示中看到了与 xcode 中相同的错误:

Error validating server certificate for 'https://mysvnserver.com:443':
 - The certificate is not issued by a trusted authority. Use the
   fingerprint to validate the certificate manually!
Certificate information:
 - Hostname: *.svn.mysvnserver.com
....
....
....
R)eject, accept (t)emporarily or accept (p)ermanently? 

Now here is the key : I hit a phere to accept (p)ermanently, and I was able to access the repository via the prompt. Next, I opened xcode and opened the repository -- everything worked flawlessly.

现在这里是关键:我在这里打了一个p以永久接受 (p),并且我能够通过提示访问存储库。接下来,我打开了 xcode 并打开了存储库——一切都完美无缺。

回答by dotbill

I had issues similar to yours, I suggest you try:

我遇到了和你类似的问题,建议你试试:

  1. Close Xcode + Organiser
  2. Open your svn web address in Safari (not any other browser) - using the dns name
  3. It should come up saying the address is untrusted as the cert is a different name / address
  4. Click show certificate and then tick the box saying always trust then continue
  5. it may prompt you for your mac username / password to add to the keychain
  6. Open xcode and try again using the DNS name..
  1. 关闭 Xcode + 管理器
  2. 在 Safari(不是任何其他浏览器)中打开您的 svn 网址 - 使用 dns 名称
  3. 应该说地址不受信任,因为证书是不同的名称/地址
  4. 单击显示证书,然后勾选始终信任的框,然后继续
  5. 它可能会提示您输入您的 mac 用户名/密码以添加到钥匙串
  6. 打开 xcode 并使用 DNS 名称重试..

The issue with xcode and accessing svn servers which have HTTPS certificates which fail any of the checks (be it host matching, self signed etc..). Opening the addresses in safari and adding as trusted solves this problem!

xcode 和访问具有 HTTPS 证书的 svn 服务器的问题,这些证书未通过任何检查(主机匹配、自签名等)。在 safari 中打开地址并添加为受信任解决了这个问题!

回答by Ram Suthar

Run command in Terminal

在终端中运行命令

svn info https://example.com/svn

It will then prompt you the "(R)eject, accept (t)emporarily or accept (p)ermanently?" Press p and problem will be solved

然后它会提示你“(R)弹出,接受(t)暂时还是接受(p)永久?” 按p,问题就解决了

回答by digitaljoel

This is an XCode 4.2 issue and you are just going to have to wait for an update from Apple or go back to a previous version. While these links (which you've probably already read) may not solve the problem, it may at least give you further information

这是一个 XCode 4.2 问题,您只需要等待 Apple 的更新或返回到以前的版本。虽然这些链接(您可能已经阅读过)可能无法解决问题,但它至少可以为您提供更多信息

Setting up SVN repository in XCODE 4.2

在 XCODE 4.2 中设置 SVN 存储库

After upgraded to Xcode 4.2, Organizer - SVN repository stopped working

升级到 Xcode 4.2 后,Organizer - SVN 存储库停止工作

https://discussions.apple.com/thread/3375258?start=0&tstart=0

https://discussions.apple.com/thread/3375258?start=0&tstart=0

回答by chown

You could enter your url using the port number instead of the httpsscheme (http://someurl.com:443/svn):

您可以使用端口号而不是https方案 ( http://someurl.com:443/svn)输入您的网址:

  • After clicking Next, Xcode shows that it can resolve the hostname:

  • Enter repo credentials and paths, etc..:

  • 单击下一步后,Xcode 显示它可以解析主机名:

  • 输入 repo 凭据和路径等:

回答by Jay

Few times SVN part of XCode behaves abnormally. If your network speed is bad, XCode doesn't update the file status properly. (From past exp.)

很少有 XCode 的 SVN 部分表现异常。如果您的网络速度不好,XCode 不会正确更新文件状态。(来自过去的经验。)

I suggest you to try either svnXor SmartSVNclients.

我建议您尝试svnXSmartSVN客户端。

As said in above responses, do check your server URL in a browser. It really helps if you are pointing to proper svn server URL or not.

如上面的回复所述,请在浏览器中检查您的服务器 URL。如果您指向正确的 svn 服务器 URL,这真的很有帮助。

回答by Brad

What about just navigating in a terminal window to ~/Documents/[projectname] and doing the svn commit from there? You should get prompted to accept the cert.

只是在终端窗口中导航到 ~/Documents/[projectname] 并从那里执行 svn commit 怎么样?应该会提示您接受证书。

Perhaps Xcode does some things behind the scenes that make this a bad idea? I just don't know if there is any difference between doing your commits within Xcode (i.e. File > Source Control > Commit) or just doing it from the command line. I've done both before and haven't noticed any problems.

也许 Xcode 在幕后做了一些让这成为一个坏主意的事情?我只是不知道在 Xcode 中进行提交(即文件 > 源代码管理 > 提交)或仅从命令行进行提交是否有任何区别。我之前都做过,没有发现任何问题。

回答by Sid

I've searched for days and in the end figured that it's a bug. I'm waiting for the next update for XCode. In the meantime, I'm making do with SmartSVN....

我已经搜索了几天,最后认为这是一个错误。我正在等待 XCode 的下一次更新。与此同时,我正在使用 SmartSVN....

If you really do need to use the SVN functionality in the IDE, I suggest downgrading XCode but then you will not be able to build to iOS5, which I'm sure you want to....

如果您确实需要在 IDE 中使用 SVN 功能,我建议将 XCode 降级,但是您将无法构建到 iOS5,我确定您想要....

Your best bet is to file a bug report (which many have done already) and wait and watch.

最好的办法是提交错误报告(许多人已经这样做了)并等待观察。