Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have an SVN server accessible with HTTP (and only HTTP) running on a firewalled port on our development system:

dev $ svn checkout http://localhost:1234/proj/trunk

On my workstation, I created a tunnel in my ssh configuration so that I can export from the repository into a staging and deployment location.

bob $ tail -n 3 ~/.ssh/config
Host svn-tun
  HostName dev
  LocalForward 8080 dev:1234
bob $ ssh -f -N svn-tun
bob $ svn export --force http://localhost:8080/proj/trunk .

What I want to do now is configure subversion (I think) to start the tunnel for me, use HTTP to localhost:8080, and then close the tunnel. I would like it to be as easy as:

$ svn export --force foo://dev-tun/proj/trunk .

Unfortunately I am not a clever man.

share|improve this question
Since you are already logging onto your development system using SSH to forward the port, couldn't you directly access the repository through SSH and bypass the web server? – Oliver Jul 13 '12 at 14:19
i will edit it to note that HTTP is the only option. – jon Jul 13 '12 at 18:48

As far as I know subversion doesn't support SSH tunnels.

You could write a script to start the tunnel and do an export:

ssh svn-tun sleep 1 &
svn export --force http://localhost:8080/proj/trunk .
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.