Monday, May 25, 2009

"Network Connection Closed Unexpectedly" error while using svn+ssh

If you got a "Network Connection Closed Unexpectedly" error while using svn+ssh (here is a nice HOWTO) then you should comment (or remove) "mesg y" in /etc/bashrc or in $HOME/.bashrc


Worked for me as a charm :)

5 comments:

Smo said...

I have tried the above, however their is no mesg y in Bashrc, what would be my next step?

Unknown said...

Try to force "mesg n" in your local bashrc. If this will not help - check out JNI version used by Eclipse. There was a post somewhere talking about this.

RickBraddy said...

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://username@domainname.com: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://username@domain.com/home/username/svn/myproject

That's it!

Hope that helps.
Rick

A Rustle said...

Hey,
wanted to let you know that the howto link on your site is now broken. The new home for the howto is http://test.tortoisesvn.net/ssh_howto.html
Thanks.

Unknown said...

"A Rustle" - thanks! Fixed the link.