Is it possible to do have Capistrano do a checkout over a reverse SSH tunnel?

Posted by James A. Rosen on Stack Overflow See other posts from Stack Overflow or by James A. Rosen
Published on 2010-04-28T11:48:04Z Indexed on 2010/04/28 11:53 UTC
Read the original article Hit count: 256

I am developing an application that resides on a public host but whose source I must keep in a Git repository behind a corporate firewall. I'm getting very tired of the slowness of deploying via scp (copying the whole repository and shipping it over SSH on each deploy) and would like to have the remote host simply do a git pull to update. The problem is that the firewall prohibits incoming SSH connections.

Would it be possible for me to set up an SSH tunnel from my computer to the deployment computer and use my repository as the source for the git pull? After all, git is distributed, so my copy is just as valid a repository as the central one. If this is possible, what would the tunnel command and the Capistrano configuration be?

I think the tunnel will look something like

ssh -R something:deployserver.com:something [email protected]

© Stack Overflow or respective owner

Related posts about capistrano

Related posts about ruby-on-rails