Thursday, August 1, 2013

Setting proxy for git and using clone over http:// instead of git://

Many times behind corporate firewalls, the default outbound connection to port

The usual command line for git is
  git clone git://github.com/jcnetdev/yubnub.git

However that will fail. Instead do:
  git clone http://github.com/jcnetdev/yubnub.git

The only other gotcha is that you might need to setup your proxy in your environment. To do this, simply do:

export http_proxy=http://<username>:<password>@<proxy_ip>:<proxy_port>

where:
    username = your network username (someuser)
    password = your network password (somepassword)
    proxy_ip = the ip address of your proxy server (192.168.1.1)
    proxy_port = the port number for the proxy (80)

the full string would look like this:
    export http_proxy=http://someuser:somepassword@192.168.1.1:80

No comments:

Post a Comment