When I attempt to checkout:
svn checkout svn+ssh://serveradmin%[email protected]/home/87292/data/svn/repository/trunk .
I get this (unhelpful) error:
svn: Network connection closed unexpectedly
What's happening?
When I attempt to checkout:
svn checkout svn+ssh://serveradmin%[email protected]/home/87292/data/svn/repository/trunk .
I get this (unhelpful) error:
svn: Network connection closed unexpectedly
What's happening?
This can happen due to an authentication failure. You may have cached credentials that do not match the site you're trying to access. You may need to register an SSH key with the site.
As suggested by the notalbert below, use SVN_SSH flag to get the detailed error in verbose mode
export SVN_SSH="ssh -v "
You might see some output like this on stderr
,
Add correct host key in /home/jcrawford/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/jcrawford/.ssh/known_hosts:4
remove with: ssh-keygen -f "/home/jcrawford/.ssh/known_hosts" -R 192.168.0.107
ECDSA host key for 192.168.0.107 has changed and you have requested strict checking.
Host key verification failed.
remove the line entry belonging to your svn server IP address, in my case it is 192.168.1.107, from the file ~/.ssh/known_hosts
OK. Here’s how I fixed this (on Mac OS X, but fix should work on any client)
This particular issue arises when you are using a non-standard port (let’s say 12001 for sake of example) for your SSH server.
Apparently the SVN client experiences syntax errors when given a port address on a command line like this one:
svn list 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:
cd ~
cd .ssh
vi config (create a config file like the one that follows)
:w
:q
Config file located in ~/.ssh/config:
Host domain.com
User username
Port 12001
Then, issue your svn+ssh command WITHOUT the port like this:
svn list svn+ssh://[email protected]/home/username/svn/myproject
That’s it!
Hope that helps. Rick
I was connecting to a local network svn and this happened to me from some point on (it actually happens periodically).
All the references I have found surfing mention something related with SSH. SSH may well be the root of my problem too somehow, but I managed to overcome the problem by killing some of the svnserve processes.
I can do this because I know what is the usage of my server, but don't know the relevance of doing this in a server with more concurrence.
If you're using Putty, it saves your login credentials thus might make tortoise give the following error when you try to checkout: Connection closed unexpectedly. If this occurs open up putty and click on default settings so that the Host Name is loaded. Clear the host name and save. This worked for me...
Make sure you did not have a spurious colon in your svn url
It should NOT be:
[email protected]:/path/to/repo
^
spurious colon should be removed
but should be:
[email protected]/path/to/repo
If you have already set up .bashrc
to refer to your key in SVN_SSH
but are then using sudo
to execute svn
the command will not be using your SVN_SSH
and you may get this error.
I was using sudo
to check out to a new directory I didn't have permission to create, the proper way is to sudo mkdir whatever
, then set the correct permissions to allow you to write to it.