XCode4添加存储库主机无法访问?
我正在尝试将远程 linux SVN 存储库添加到我的项目中,但是当我输入服务器地址时,我收到消息“主机无法访问”。
我像
svn://ip_address/myproject/
从终端一样输入它,我可以执行此操作
svn list svn://ip_address/myproject/
,并且它会毫无问题地显示内容。
I'm trying to add a remote linux SVN repository to my project but when I enter the server address I get the message Host is unreachable.
I'm entering it like
svn://ip_address/myproject/
From terminal I can do this
svn list svn://ip_address/myproject/
and it shows the contents without any issues.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我在链接到 Git 存储库时也遇到了这个问题。 XCode 似乎在 IP 地址方面存在一些问题。我发现通过修改主机(Mac 上的 /private/etc/hosts)文件并添加存储库 IP 地址的条目就可以解决问题。
Hosts 文件条目:
在 XCode 的位置字段中:
上面引用其他问题答案的注释并未涵盖 IP 地址问题。希望这也能解决您的问题。
I had this problem as well in linking to a Git repository. It seems XCode has some issues with IP addresses. I found that by modifying my hosts (/private/etc/hosts on Mac) file and adding an entry for the repository's IP address does the trick.
Hosts file entry:
In the Location field in XCode:
The comments above referencing the other question's answer doesn't cover the IP address issue. Hopefully this will fix your issue too.
要修改主机文件,请打开终端并输入以下命令:
现在您已使用“nano editor”打开文件主机,添加 IP,保存并关闭。
将以下代码放入终端刷新 dns 后:
d
scacheutil -flushcache
END!
To modify the host file you open the terminal and put this command:
Now you have opened with "nano editor" the file hosts, add IP, save and close.
After you put this code in the terminal to reflush dns:
d
scacheutil -flushcache
END!
这可能不是原始发帖人遇到的问题的解决方案,但由于不同的原因可能会收到相同的错误消息,这就是我发布此内容的原因。
Xcode 在 ssh 登录横幅方面遇到问题。
很简单,如果您的 svn 服务器是通过 svn+ssh 访问的,并且正在使用登录横幅,Xcode 将声明您的存储库无法访问。注释掉 /etc/sshd_config 中的
Banner
条目,这样您无法访问存储库的原因就少了一个。This is probably not the solution to the issue the original poster was experiencing, but the same error message can be received for a different reason, which is why I post this.
Xcode has trouble with ssh login banners.
Quite simply, if your svn server is accessed via svn+ssh and is making use of a login banner, Xcode will state that your repository cannot be reached. Comment out the
Banner
entry in /etc/sshd_config, and there should be one less reason why you cannot reach your repository.我也很不幸地遇到了这个。我如何修复损坏的存储库如下。
希望这有帮助
I also came across this with hard luck. How I fixed my broken repository is as follows.
Hope this helps