It is very often required that you need to commit/update to the svn repository which is only indirectly accessible through a gateway (user can ssh to gateway and gateway can ssh to internal svn server)
Suppose you have a working copy (locally on your machine) setup with the real svn url (eg : svn+ssh://svn.example.com)
– Make ssh connection with local port forwarding to the gateway server
# sudo ssh gateway.example.com -L 22:svn.example.com:22
Change the repository url to localhost, since the local host connection forward to remote svn server through the gateway.
# svn switch –relocate svn+ssh://svn.example.com/trunk svn+ssh://localhost/trunk
Now you should be able to update, commit, etc to/from your repository.
You can switch it back to the original url when you have direct access to repository.
2 replies on “svn over ssh tunnel”
What should I change if I’m using http to access my repo?
Please establish the tunnel as it is, and try to use your repository with http instead of ssh.
svn switch -relocate http://svn.example.com/path http://localhost/path