Jun 17 2007

How to do a Remote Access of your SVN repository over SVN+SSH

Published by at 7:44 am under subversion

SVN repositories can be remotely accessed via http, https, svn, svn+ssh protocols. The secure approach is to use https or svn+ssh. Most of the times, accessing via https is not feasible because of the additional requirement of the SSL certificate to be installed on your server where the repository is. But it is easy to access via SVN+SSH protocol. The reason being that all you need is SSH server in the remote machine and SSH and SVN client on your local machine. If you are repository server is Linux, then SSH comes by default.

Here are the Assumptions:

On the Remote machine where your repository is present:

  • ssh server is up and running
  • you have a ssh login account
  • the user who logs into the machine via ssh has sufficient permission to read/write the “db” directory in the svn repository.

On the Local machine, ( Assume windows )

  • SVN client is installed. If not download it from here and just do a normal install.
  • SSH client is installed. If not install putty. You can download from here and do a normal install

Now follow the procedure to checkout a project from a remote SVN repository

  • Open the windows explorer
  • navigate to the directory where you want the local store to be
  • right click the mouse, and select “SVN Checkout”. If you have installed SVN, this option will show up when you do a right click in the explorer.
  • A window as shown below opens up.
  • enter the svn checkout command. svn+ssh://ssh_username@ssh_remote.machine.name/path/to/repository
  • For example, if theusername is ben and the remote machine name is example.com and path to repository is /home/ben/source, then the above command will look like
  • svn+ssh://ben@example.com/home/ben/source
  • Once you enter this, the local machine will ask for the SSH password. Enter the password. It may ask for more than one time. Just reenter.
  • Now you should see the code checked out into your local machine.

If you dont want to use a graphical SVN client but a command line svn client, then do the following

cd /path/to/local/directory

svn co svn+ssh://ssh_username@ssh_remote.machine.name/path/to/repository

Comments Off on How to do a Remote Access of your SVN repository over SVN+SSH

Comments are closed at this time.