XCode + SVN 出现错误 210002
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1179112/
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
Error 210002 with XCode + SVN
提问by bpapa
I'm trying to use the built-in Subversion server on OS X per Apple's instructionI'm trying to use SVN through SSH and not apache
我正在尝试按照Apple 的说明在 OS X 上使用内置的 Subversion 服务器我正在尝试通过 SSH 而不是 apache 使用 SVN
It's not working out though. When I try to configure the repository, I get the following error:
虽然它不起作用。当我尝试配置存储库时,出现以下错误:
Error: 210002 (Network connection closed unexpectedly) Description: Connection closed unexpectedly
As a sanity check, I tried doing an "svn list" from the command line, and it worked. And, I'm using the same URL structure as on the configuration screen. From the command line, it works!
作为健全性检查,我尝试从命令行执行“svn list”,并且成功了。而且,我使用与配置屏幕上相同的 URL 结构。从命令行,它的工作原理!
Any suggestions on how to further troubleshoot this issue?
有关如何进一步解决此问题的任何建议?
回答by user154075
I had the same error, but what happened was I rebuilt a server and the file called "known_hosts" had the old server setup of that same machine in my user account, in "~/.ssh", I trashed the known_hosts file and went to terminal, and re-ssh-ed. After that everything worked as normal.
我遇到了同样的错误,但发生的事情是我重建了一个服务器,并且名为“known_hosts”的文件在我的用户帐户中具有同一台机器的旧服务器设置,在“~/.ssh”中,我删除了 known_hosts 文件然后去了到终端,并重新 ssh-ed。之后一切正常。
Hope that helps,
希望有所帮助,
Laters...
后来...
回答by Piesia
I had the same problem after I needed to delete and recreate my login keychain. Once I added the password again for one svn repository in the XCode Repositories Configure panel (which shows the XCode Preferences Repositories panel), clicked Always Allow for the keychain access prompt, and then clicked Apply in the XCode Repositories Configure panel where I added the password, then SVN access for all my projects worked again.
在需要删除并重新创建我的登录钥匙串后,我遇到了同样的问题。在 XCode 存储库配置面板(显示 XCode 首选项存储库面板)中再次为一个 svn 存储库添加密码后,单击“始终允许”以获取钥匙串访问提示,然后在我添加密码的 XCode 存储库配置面板中单击“应用” ,然后我所有项目的 SVN 访问再次起作用。
Sorry for bumping an old thread, but I hope this helps someone who has the "Error: 210002 (Network connection closed unexpectedly) Description: (null)" problem when trying to use SVN for an XCode project.
很抱歉碰到旧线程,但我希望这可以帮助那些在尝试将 SVN 用于 XCode 项目时遇到“错误:210002(网络连接意外关闭)描述:(空)”问题的人。
I'm using XCode 3.2.1 (64-bit).
我正在使用 XCode 3.2.1(64 位)。
Best regards,
此致,
Piesia
皮西亚
回答by snibbe
This is an easy-to-miss point about configuring XCode and Subversion/SCM running on the same computer. For it to work, you must go into Settings->Sharing and enable "Remote Login" by checking the checkbox.
这是关于配置在同一台计算机上运行的 XCode 和 Subversion/SCM 的一个容易错过的点。要使其工作,您必须进入设置->共享并通过选中复选框启用“远程登录”。
回答by Rick
OK. Here's how I fixed this (on Mac OS X, but fix should work on any client)
好的。这是我修复此问题的方法(在 Mac OS X 上,但修复应该适用于任何客户端)
This particular issue arises when you are using a non-standard port (let's say 12001 for sake of example) for your SSH server.
当您为 SSH 服务器使用非标准端口(例如,假设为 12001)时,就会出现这个特殊问题。
Apparently the SVN client experiences syntax errors when given a port address on a command line like this one:
显然,当在命令行上给定端口地址时,SVN 客户端会遇到语法错误:
svn list svn+ssh://[email protected]:12001/home/username/svn/myproject
svn 列表 svn+ssh://[email protected]:12001/home/username/svn/myproject
So, to fix this, you need to create a client-side config file for SSH like this:
因此,要解决此问题,您需要为 SSH 创建一个客户端配置文件,如下所示:
cd ~ cd .ssh vi config (create a config file like the one that follows) :w :q
cd ~ cd .ssh vi config(创建一个如下所示的配置文件):w :q
Config file located in ~/.ssh/config:
配置文件位于 ~/.ssh/config:
Host domain.com User username Port 12001
主机 domain.com 用户用户名 端口 12001
Then, issue your svn+ssh command WITHOUT the port like this:
然后,在没有端口的情况下发出 svn+ssh 命令,如下所示:
svn list svn+ssh://[email protected]/home/username/svn/myproject
svn 列表 svn+ssh://[email protected]/home/username/svn/myproject
That's it!
就是这样!
Hope that helps. Rick
希望有帮助。瑞克