Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git push/pull times out

I can't git push/pull to github from my corporate vpn:

git push origin master
ssh: connect to host github.com port 22: Connection timed out
fatal: The remote end hung up unexpectedly

I assume this is a firewall issue, b/c if I disconnect from the vpn it works. Is there anything I can do to work around it? Or am I stuck disconnecting from the vpn when I need to push/pull?

like image 468
Gabe Moothart Avatar asked Apr 16 '09 18:04

Gabe Moothart


1 Answers

Not sure which type of VPN you're using, but this sort of effect is usually due to the VPN setup routing all your traffic over the VPN. You can work around that by updating your routing tables to route traffic to github back over your Ethernet (I assume) interface rather than over the VPN.

For example route add 65.74.177.129 eth0 will route traffic to github over eth0. This is the Linux syntax; Windows has a "route" command as well that is broadly similar.

(This isn't really a git-specific problem, and in fact you should be able to demonstrate the problem by trying to connect to github.com port 22 with any client such as telnet, nc or PuTTY: sshd will usually print a banner with its version number as soon as you connect)

like image 178
araqnid Avatar answered Sep 24 '22 17:09

araqnid