Tuesday, October 28, 2014

Connect to github.com (clone a repository) from behind a firewall

I was (luckily) very very frustrated as I could not clone a repo from github.com till I found the solution. Socks proxy (from SSH Tunnel) simply did not work.

Here are the steps I took in order to finally get the repo cloned.

The repo I wanted to clone: git clone https://github.com/pentaho/mondrian.git


  1. Create a SSH Tunnel. Mine is set at localhost 8888.
  2. Do a local port forward to github.com 22. I forwarded port 3334. In putty settings it looks like: L3334 github.com:22.
  3. Create a github account.
  4. Copy your public ssh to your github account.
  5. Clone using git clone ssh://git@localhost:3334/pentaho/mondrian.git. Use the user git as in the command and not your user name.

Hopefully it helps some frustrated IT worker behind a corporate firewall.

No comments:

Post a Comment