tags:

views:

2663

answers:

3

OK, I'm having a problem settings up SVN+SSH.

I have SVN running on a Linux server and trying to connect from a Mac laptop running Snow Leopard. XCode tries to connect, but gives the message "Error 210002, network connection closed unexpectedly."

Nothing online seems to explain. I connect using xcode with HTTP and it works correctly for all repositories.

Here's my SVN vesrion:

svn, version 1.5.4 (r33841)
compiled Aug  7 2009, 01:44:11

Copyright (C) 2000-2008 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme

I currently have it set up to use http, which works without problems.

http://[email protected]/svn/project

I can ssh to the server using username and password, and run commands such as

svn list file:///home/svn/project

and I get a listing of the contents of that project. So, I don't think it's a permissions problem.

Files on server are at /home/svn/project.

I'm trying to get this to work in XCode. Doesn't work using the path as /home/svn/project or just /svn/project as works in http.

But, from the laptop, the following command does list info as expected:

svn list svn+ssh://[email protected]/home/svn/project
[email protected]'s password:
branches
tags
trunk
Killed by signal 15.

The program svnserve isn't running, but the user I'm logging in with has the ability to run it. If I do start it in foreground mode, it doesn't seem to change anything.

Any ideas what I'm missing. Would love to be able to run svn+ssh and turn off http access.

Cheers!

EDIT

For some more information, I found that it's only one repository. All other repositories on the server seem to be working correctly with SVN+SSH.

It seems to be an XCode bug, but I don't know for sure. It's something about how XCode reads SSH connection information that may be cached in the computer.

+1  A: 

That 'Killed by signal 15' is a clue that something is not quite right even with your command line usage. I remember fixing the same issue, but don't remember the exact cause. I think it had to do with how I was handling my non-standard ssh port and having a different username on my local computer and the remote server.

Does your svn host have a non-standard ssh port and/or different username? I switched from using a SVN_SSH variable to set the port to putting a proper entry in my .ssh/config file that set both the username and port for the ssh connection.

Host example.com
  User username
  Port port

I'm not sure whether xcode respects your .ssh/config though.

Dave Bacher
It's something like that. I don't have a .ssh/config file, but I do have a .ssh/known_host file.I tried with a different repository, and it was working over http, but the host there was www.example.com, and not just example.com, and it had a separate entry in the known host file. It gave the same error, but somehow I got it to work with changing the host to just example.com. But, it works even though the other repository sees the killed by signal 15 message.Thanks for your response. I don't know what the problem is, and I'd like to figure it out, but it's not as urgent right now.
Michael
A: 

to suppress "killed by signal 15" messages please set SVN_SSH="ssh -q" as mentioned by http://readlist.com/lists/subversion.tigris.org/users/10/51275.html.

sl

sl
A: 

Does your server have a firewall, and if so, does it limit the number of SSH connection attempts, such as by the method described here? We were experiencing the exact same problem of having the connection dropped for svn checkout, but not for svn ls, over svn+ssh://. We adjusted the connection settings on the firewall to be more lenient, allowing more connections per minute, and this instantly cleared our problems. It seems that SVN is very aggressive in initiating connections during certain operations, and less so for others.

gotgenes
I would get this problem inside the network. The router didn't seem to help.I changed to use https.
Michael