Monday, June 16, 2008

Setting up SVN+SSH Protocol in Eclipse

In order to be able to use SVN+SSH with Eclipse Subversion plugin you need to do the following:-

1. First open following file named config in the text editor. The config file is located in the user's Application Data\Subversion directory.

For example if the user for which the subversion client is installed is svnuser then the file path should be:-

C:\Documents and Settings\svnuser\Application Data\Subversion\config

2. In the file locate commented #ssh and uncomment it and set the path to the path of TortoisePlink.exe (you need to have TortoiseSVN installed). You can either set the path as an environment variable or directly put the path in the config file. If you put the path in environment variable you need to point to the variable in config file like as shown:-

ssh= $SVN_SSH ssh

where $SVN_SSH is the environment variable name

If you want to directly point to the executable in the config file do it as follows

ssh=E:\\TortoiseSVN\\bin\\TortoisePlink.exe

TortoiseSVN is not the only option. Actually, we can use any ssh connection tool that supports same command line parameters as the SSH executable available in Unix.

To sum it all here is an extract from the config file
### as:

#ssh = $SVN_SSH ssh
ssh=E:\\TortoiseSVN\\bin\\TortoisePlink.exe
### If you wanted to define a new 'rsh' scheme, to be used with
### 'svn+rsh:' URLs, you could do so as follows:



This is what we need to do at the config file to start using svn+ssh. But sometimes I have found that eclipse plugin continuously keeps on asking for password. This occurs when the the SVN client used in eclipse is Default Native Java HL . So change it to Java SVN.

If you don't know where those changes are to be made follow following detailed steps:-
a. In Eclipse go to windows menu.
b. Click Preferences and expand Team option.
c. After expanding Team you will find SVN option click on it.
d. On the right side you will find the SVN client setting. Select the option as stated above and restart the eclipse (though restart might not always be necessary).

No comments: