XCode4添加存储库主机无法访问?

发布于 2024-11-24 16:04:55 字数 244 浏览 3 评论 0原文

我正在尝试将远程 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

雨夜星沙 2024-12-01 16:04:55

我在链接到 Git 存储库时也遇到了这个问题。 XCode 似乎在 IP 地址方面存在一些问题。我发现通过修改主机(Mac 上的 /private/etc/hosts)文件并添加存储库 IP 地址的条目就可以解决问题。

Hosts 文件条目:

i.p.add.ress  serverName  #where i.p.add.ress is your ip_address

在 XCode 的位置字段中:

svn://serverName/myproject

上面引用其他问题答案的注释并未涵盖 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:

i.p.add.ress  serverName  #where i.p.add.ress is your ip_address

In the Location field in XCode:

svn://serverName/myproject

The comments above referencing the other question's answer doesn't cover the IP address issue. Hopefully this will fix your issue too.

绝對不後悔。 2024-12-01 16:04:55

要修改主机文件,请打开终端并输入以下命令:

sudo nano /private/etc/hosts

现在您已使用“nano editor”打开文件主机,添加 IP,保存并关闭。
将以下代码放入终端刷新 dns 后:

dscacheutil -flushcache

END!

To modify the host file you open the terminal and put this command:

sudo nano /private/etc/hosts

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:

dscacheutil -flushcache

END!

七堇年 2024-12-01 16:04:55

这可能不是原始发帖人遇到的问题的解决方案,但由于不同的原因可能会收到相同的错误消息,这就是我发布此内容的原因。

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.

旧城烟雨 2024-12-01 16:04:55

我也很不幸地遇到了这个。我如何修复损坏的存储库如下。

  1. 启动 XCode 并签出或克隆一个新的存储库。
  2. 复制 git HTTPS 克隆 URL。
  3. 粘贴到 Xcode 字段并删除 HTTPS 的“S”。
  4. 按克隆按钮
  5. 当出现“验证证书”弹出窗口时,请确保将其设置为“始终信任”。
  6. 如果需要输入 git 用户名密码,请将其保存到钥匙串。
  7. 在原始的“损坏的存储库”中打开 XCode 管理器,单击远程文件夹并展开“origin”
  8. 如果没有出现分支,请输入用户名和密码,现在将出现远程

希望这有帮助

I also came across this with hard luck. How I fixed my broken repository is as follows.

  1. Start XCode and check out or clone a new repository.
  2. Copy the git HTTPS clone URL.
  3. Paste into the Xcode field and remove the "S" of HTTPS.
  4. Press clone button
  5. When the "verify Certificate" popup appears make sure to set it to "Always Trust"
  6. If needed to enter git username password save that to the keychain.
  7. In the original "broken repository" Open the XCode organizer click the remotes folder and expand "origin"
  8. If no branch appears enter username and password and the remote will now appear

Hope this helps

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文