Reputation: 3030
I use the below way to set the proxy in my linux machine.
export HTTP_PROXY=http://proxy.xxxxxx.com
git config --global http.proxy $HTTP_PROXY
But the below error still happened.
[root@xxxxxxx cnpm]# git clone git://github.com/cnpm/cnpmjs.org ./cnpmjs.org
Cloning into './cnpmjs.org'...
fatal: unable to connect to github.com:
github.com[0: 192.30.252.129]: errno=Connection timed out
ps: In our company, IE proxy is set using http://proxy.xxxxxx.com, and I can download the git project in IE manually.
Upvotes: 1
Views: 167
Reputation: 1323553
http_proxy is only valid for http url, not git url.
The git protocol is a special daemon that comes packaged with Git; it listens on a dedicated port (9418) that provides a service similar to the SSH protocol, but with absolutely no authentication
It is not concerned with http_proxy environment variable.
For GitHub http url environment settings, see:
Upvotes: 1