带有 Eclipse (subclipse) 命令行的 SVN 可以工作,subclipse 不能(网络连接意外关闭)
我的老板刚刚在新服务器(ubuntu)上为新项目设置了 SVN 存储库。在 Eclipse 中,我无法将存储库添加到 SVN 存储库,我一直收到“ 网络连接意外关闭 svn:为了更好地调试 SSH 连接问题,请从 Subversion 配置文件的 [tunnels] 部分中的“ssh”中删除 -q 选项。”。
为了查看 svn 存储库,我做了:
svn co svn+ssh://[email protected]/var/svn/repos/ PROJECT_NAME
然后我在中创建了一个新项目Eclipse,使用“source”我签出存储库的目录,Eclipse 识别了 SVN 存储库,但是当我尝试执行 SVN 更新/提交时,我不断收到 “网络连接意外关闭 svn:为了更好地调试 SSH 连接问题,请从 Subversion 配置文件的 [tunnels] 部分中的“ssh”中删除 -q 选项。”
如果我在命令行中执行 svn up/svn commit ,它就可以正常工作。Subclipse 使用 JavaHL 1.6.12 作为 svn 界面。
我使用的是 Mac OS X 10.6.3(如果这很重要的话)
。和 subclipse 但它们的存储库的格式都是:
http://repository.example.com/svn/
在当前情况下,我的存储库位于:
svn+ssh://[email protected]/var/svn/repos
所以我认为它可能与协议有关?
My boss just set up SVN repository for a new project on a new server (ubuntu). In Eclipse I wasn't able to add the repository to SVN repositories, I kept getting "
Network connection closed unexpectedly
svn: To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file.".
In order to check out the svn repo I did:
svn co svn+ssh://[email protected]/var/svn/repos/ PROJECT_NAME
Then I created a new project in Eclipse, using "source" the directory where I checked out the repository, Eclipse recognized the SVN repository but when I try to do SVN update/commit I keep getting
"Network connection closed unexpectedly
svn: To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file."
If I do svn up/svn commit in the command line it works fine. Subclipse uses JavaHL 1.6.12 as svn interface.
I'm on Mac OS X 10.6.3 (if that even matters).
I have many other repositories that work fine with both command line and subclipse but their repositories are all in format:
http://repository.example.com/svn/
And in the current case my repository is in:
svn+ssh://[email protected]/var/svn/repos
So I think it might have to do something with the protocol?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果有人遇到这种情况,问题确实出在使用 JavaHL Subversion 接口时的“svn+ssh”协议。我从 Eclipse 切换到 SVNKit ->首选项->团队-> SVN 现在工作正常了。
In case someone has this, the problem indeed was with "svn+ssh" protocol while using JavaHL Subversion interface. I switched to SVNKit from Eclipse -> Preferences -> Team -> SVN and now it works fine.
我也有很多通过 subclipse 运行的存储库,但我从未使用 svn+ssh 做过一个。然而,在阅读了这个网站后,我想知道您是否想尝试使用 ssh 密钥。如果您不知道如何设置密钥此网站应该指导您完成整个过程。
编辑:我看到同时还有另一个答案。 Veseliq 看起来他知道他在说什么,但是我将把它留在这里,并且使用 ssh 密钥不会有什么坏处......如果它与 subclipse 不知道有关,它仍然可能解决你的问题如何通过 ssh 或其他方式处理身份验证。
I have many repositories functional through subclipse as well but I've never done one with svn+ssh. However, after reading a bit on this site I am wondering if you might want to try using ssh keys. If you are unaware how to set up your keys this web site should guide you through the process.
Edit: I see there was another answer in the meantime. Veseliq looks like he knows what he is talking about, however I'll leave this here as well as it can't hurt to use ssh keys...and it still could potentially fix your problem too if it is related to subclipse not knowing how to handle authentication via ssh or something.