February 9, 2008 – 5:02pm Using svnX with svn+ssh on a non-standard port

svnX is a great mac GUI for svn repositories. A lot of our svn servers are accessed via non-standard ports for security, and a limitation of the svn+ssh syntax is that you can’t specify a non-standard port in the address name. To get around this in the command line, you can set a local environment variable “SVN_SSH” like so:

export SVN_SSH="ssh -p xxxx"

where xxxx is the port number. That works well if all of your SVN repositories that you access via SSH use the same port number, and if you *don’t* use svnX.

svnX doesn’t use your .bash_login environment variables before running it’s commands, so it’s doesn’t see you want to use a non-standard ssh. However, you *can* add custom ssh hostnames that use your non standard port, and then pass these to svnX as the path.

Open up ~/.ssh/config (or create it if it doesn’t exist) and add a host name like so:

host svn1
  Hostname svn.yourdomain.com
  Port xxxx
  ForwardAgent no
  ForwardX11 no

And then finally, when you put in the path in svnx, use “svn1″ as the hostname:

Path: svn+ssh://username@svn1/path/to/repository

svnX will now be able to access your svn repository through a non-standard ssh port.

Posted in  OS X Web Development   |     |  delicious  Digg

Post a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word