To run Subversion over SSH, you basically need a shell on the target system and a subversion repository located there which is created following the description above. The repository must be configured for access by the system users of the remote system.
Assuming that your user name on the client system is the same as on the
server side, there is not much to configure. Just change the protocol
specificaton from file://
to
svn+ssh://remoteusername@server-hostname
in all
examples showed in this manual.
Note that during svn-buildpackage tools actions a lot of SSH calls can be made
and so the user is asked for his login data. The regular method to deal with
that is using an SSH key authentication method together with ssh-agent and
ssh-add to cache the passphrase in memory. Another approach, which also brings
a significant speed boost, is using a cached SSH connection. This can be done
with a new feature of OpenSSH (see
GCC SSH connection caching howto) or a third-party tool like
fsh
.
If you wish to use fsh over
ssh you could specify a custom transport method in
the subversion configuration. To do so, edit the file
~/.subversion/config
and add the section
[tunnels]
to it, following by your custom transport
definition. Example:
Example 2.3. Example of a custom ssh tunnel command.
# personal subversion config with custom ssh tunnel command [tunnels] # SSH account on svn.d.o # compression is enabled in the ssh config deb = fsh -l <user> # SSH account for NQ intranet, set fix username nq = ssh -C -l zomb
You can use the new defined tunnels in a similar ways as described above
but replace svn+ssh
with
svn+tunnelname
, so the final URL looks like:
svn+deb://svn.debian.org/svn/myproject/ourpackage/trunk