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 :)


Sophie Elisabeth said...

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

Viktor Yarmak 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://

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)

Config file located in ~/.ssh/config:

User username
Port 12001

Then, issue your svn+ssh command WITHOUT the port like this:

svn list svn+ssh://

That's it!

Hope that helps.

A Rustle said...

wanted to let you know that the howto link on your site is now broken. The new home for the howto is

Viktor Yarmak said...

"A Rustle" - thanks! Fixed the link.