Saturday, June 18, 2011

Getting subversion svn+ssh:// to work with Eclipse (subclipse)

I’ve been moving all my code to a centralized version control system and had everything setup using CVS when I noticed that some of my NS-2 code started to break due to soft-link problems (CVS doesn’t support it). So I downloaded and install GIT (only to find out that it doesn’t natively handle it as well). So I ended up with SVN, however, I didn’t want to do it through WebDAV or as a new service… SVN however allows for SSH tunneling (i.e. with a subversion repository url of svn+ssh://talmai@talmai.com.br/myrepo) and I can use integrate it using the Subclipse subversion integration with Eclipse.

When I used JavaHL (JNI) I got the following error, “svn: Can’t create tunnel: The system cannot find the file specified“. After some googling, I discoved that I needed to configure eclipse to use the JavaSVN interface (In Eclipse, under Windows –> Preferences –> Team –> SVN –> SVN interface: make sure you have selected JavaSVN). The next error that popped-up was “svn: Handshake failed, received:“, and when I tried to connect using a shell (“svn list –verbose snv+ssh://talmai@talmai.com.br/myrepo“) I got “‘bash: svnserve: Command not found“. Obviously this was a path problem, but my PATH was correctly, so I ended up adding a link to svnserve on /usr/bin. Things magically worked from that point on. :)

2 comments:

  1. Hello Talmai Oliveira,

    Good Day!!

    I was having the same issue, spend about 4 hrs googling, but your fix worked like a charm.

    Thanks a lot.

    Ganesh K
    Bangalore

    ReplyDelete
  2. Hello,

    Thanks for posting this! I probably would have never figured it out on my own.
    I had the same problem with Subclipse, and changing to the "pure java" svn interface fixed it!

    Thanks again! :)
    Gabor V.

    ReplyDelete