If you would like to use git behind proxy, you can configure proxy settings via a following git-specific way. Note that setting http_proxy environment variable alone is not sufficient since the variable is ignored by git. You need to store proxy information in a git configuration file by using the following command.
$ git config --global http.proxy $http_proxy
Then, a user-specific git configuration file (~/.gitconfig) will be created and updated as follows.
[http] proxy = http://myproxy.domain.com:1234
If you are using Ubuntu 11.04 or 11.10, you may be getting the following error when trying to clone any repository via https from github:
remote HEAD refers to nonexistent ref, unable to checkout
The error is due to a bug in the libcurl version installed in the particular version of Ubuntu you are using. To solve the problem, manually install the latest libcurl3-gnutls, and two dependencies from:
Subscribe to Xmodulo
Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.
Did you find this tutorial helpful? Then please be generous and support Xmodulo!