title: Accessing a git repository via ssh behind a firewall
body: <p>I would like to access (clone/push/pull) a private (via ssh) git repository while behind a corporate firewall that only allows http proxy access. I have written a robust Java (daemon) program (based on the JSCh class library) that will allow me to leverage local and remote port forwarding and I am hoping to leverage this but my brain hurts when I try to envision how to set this up.</p>
  
  <p>The git repo depot (to coin a phrase) is at foo.server.com/var/git so the natural inclination, ignoring the fireall, to set up a clone would be:</p>
  
  <pre><code>$ git clone ssh://foo.server.com/var/git/myrepo.git
  </code></pre>
  
  <p>but the firewall will block this command.  I'm inclined to try something like</p>
  
  <pre><code>$ git clone ssh://localhost:8022/var/git/myrepo.git
  </code></pre>
  
  <p>where localhost:8022 is forwarded to foo.server.com:22</p>
  
  <p>So is this path worth pursuing?  Is there any easier solution that is still secure?  Are there pitfalls or gotchas I should be aware of?</p>