Accessing github from behind a proxy

January 2nd, 2009 by Trent Leave a reply »

If you’re behind a proxy which restricts outbound ports (i.e. only port 80 and 443), then you’ll be pleased to know that you can still access Github.

Rather than using the git:// protocol (defaulting to port 9418), you can use the HTTP protocol to do the same thing! Article on Github about it here.

git clone http://github.com/justinfrench/formtastic.git

It also works for Rails plugins!

script/plugin install http://github.com/justinfrench/formtastic.git

Don’t forgot you need to set environment variable http_proxy to tell Git to use the proxy or or can set it in git-config. The example below sets it at the global level:

git config --global --add http.proxy http://myproxy:8080
Advertisement

Leave a Reply