Can’t Access Github behind proxy or Firewall
Use corkscrew to get through the firewall. You will have to install it from source.
website: http://www.agroman.net/corkscrew/
Now edit your ~/.ssh/config file, create it if you haven’t got one.
> cat ~/.ssh/config
Host gitproxy
User git
Hostname ssh.github.com
Port 443
ProxyCommand /usr/local/bin/corkscrew proxy.example.com 3128 %h %p
IdentityFile /home/jordan/.ssh/id_rsa
Host gitproxy
User git
Hostname ssh.github.com
Port 443
ProxyCommand /usr/local/bin/corkscrew proxy.example.com 3128 %h %p
IdentityFile /home/jordan/.ssh/id_rsa
Now use this proxy when cloning git
git clone git@gitproxy:jordandcarter/ihavealovelybunchofproject
If you have trouble connecting, cloning, pulling, pushing to and from git through a firewall with a proxy. This should have have solved your problem and allow git to create an ssh tunnel through the http proxy.
Related Posts
Posted on March 17, 2010 at 9:45 pm by Jordan Carter · Permalink
In: Server Config, Ubuntu Tricks, Web Development · Tagged with: corkscrew, git, github.com, http proxy, ssh
In: Server Config, Ubuntu Tricks, Web Development · Tagged with: corkscrew, git, github.com, http proxy, ssh


on May 28, 2010 at 2:25 am
Permalink
Hey, my proxy have authentication and i cant connect, it gives the following error:
Proxy could not open connnection to gitproxy: Proxy Authentication Required
ssh_exchange_identification: Connection closed by remote host
Please help me and reggards from Cuba
on June 3, 2010 at 5:16 am
Permalink
What you need to do is (if unix system)
Change ProxyCommand /usr/local/bin/corkscrew proxy.example.com 3128 %h %p
to
ProxyCommand /usr/local/bin/corkscrew proxy.example.com 3128 %h %p /home/dairon/.proxyauth
Then inside .proxyauth put
The proxy will now be used with that username and password.