The configuration of svn+ssh is not a special subcommander issue but a subversion one. The configuration is done in subversions own configuration file. Anyway, the next few sections give a short description how to configure svn+ssh with public key authentication on the different plattforms.
The easiest way to run svn+ssh
from
subcommander on Win32 is to use PuTTY for handling the ssh connections.
PuTTY is a free SSH client for Win32. You can download PuTTY from its
web site (see the section called “PuTTY”).
The ssh
part (the scheme) in
svn+ssh
is more or less free configurable. Its an
identifier subversion uses to look up the command it should use to run
the svnserve process on a remote machine. For the example we add the
PuTTY command as the scheme putty
into our local
subversion configuration file. We can then access our repository using
svn+putty//<server>/<repositorypath>
. It
doesn't matter if our server url is given as svn+ssh. It is only
important that we can access the server machine with ssh using public
key authentication.
Here is what we add to the configuration file in the
tunnels
section (this is just one of several possible
ssh configurations we could use):
[tunnels] putty = <path>/plink.exe -ssh -2 -l <username> -i <keypath>/id_rsa.ppk
The plink.exe
is PuTTYs command line tool. We
tell it to create an ssh
connection using the ssh
protocol 2 (-2
), our username (-l
)
we want to use to connect to the repository server and the filename
(-i
) of our private key for the ssh
authentication.
Since our private key is encrypted with a pass phrase, PuTTY would
ask on each call to the repository for the pass phrase to decode our
private key. This would make the secure ssh connection completly
unusable. The solution is another PuTTY tool called
Pageant
.
Pageant stores decoded private keys at runtime in memory. If Plink detects that Pageant is running it requests the decoded private key from it. We only need to load our private into Pageant and enter the pass phrase (one time) so it can decode it.
That's all we need to do to use svn+putty
://..
urls to access our subversion repository over a secure ssh connection.
Because we configured this in subversions configuration file,
svn+putty
will work from subcommander and it will
also work with subversions command line tool.