If you are in a location that allows SSH but doesn't allow access to GitHub (I'm looking at you India), here's an easy way to get around it.
- You need a shell account on a network that doesn't filter GitHub. Ideas for that:
- Pay but Cheap: A micro instance on EC2 http://aws.amazon.com/ec2/pricing/
- Free-ish: One of the free shell solutions http://shells.red-pill.eu/
- The shell account will need access to the netcat binary called
nc
http://nc110.sourceforge.net/ - The SSH daemon on the shell account will need to allow TCPForwarding (this is usually enabled by default on most sshd systems, but I don't know about those freebie accounts above. I've never used them.
- You've setup your key in your SSH agent https://developer.github.com/guides/using-ssh-agent-forwarding/
This will work for Mac and Linux.
-
Edit
$HOME/.ssh/config
-
Add an entry such as
Host github.com
ForwardAgent yes
ProxyCommand ssh [email protected] nc github.com 22
Where shelluser
is your shell username and shellhost.domain.com
is the DNS/IP to your non-filtered host.
You can test by running a git command or simply ssh [email protected]
.
For Windows, have a look at doing the above in Putty using a document like this one: https://monkeyswithbuttons.wordpress.com/2010/10/01/ssh-proxycommand-and-putty/
Many thanks, works for me!