Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I run git clone git://git.gnome.org/tracker, I get:

Cloning into tracker...
git.gnome.org[0:]: errno=Connection refused
fatal: unable to connect a socket (Connection refused)

This doesn't happen when I'm not behind a network proxy I'm currently at.

share|improve this question
up vote 5 down vote accepted

Use the http version of git.gnome.org repo and set http_proxy environment variable

git clone http://git.gnome.org/browse/tracker

you might also need to add the proxy to git config

git config --global http.proxy $http_proxy
share|improve this answer
This worked for me, but it would be extra nice to know how to do it with using the git protocol. – Tshepang Mar 18 '11 at 18:14
@Tshepang: See @Gilles thorough explanation. Nothing more to add there. – forcefsck Mar 18 '11 at 21:30

Terminology note: the firewall is what blocks you from connecting to some sites or ports directly. The proxy is an intermediate server that you can connect to (but not for everything) and that is allowed to access the Internet.

If your proxy isn't trying too hard to block non-web traffic, you may be able to get it to relay your git connection. Use a program like corkscrew or connect-proxy to use the CONNECT method to try and get through the proxy. Put something like this in your ~/.git/config (replace proxy.example.com and 3128 by your proxy's host name and port):

gitProxy="corkscrew proxy.example.com 3128 git.gnome.org 9418"

Many proxies are configured to allow CONNECT only to port 443 (https), and they may check that the traffic they're relaying is actually SSL. If that's the case for you, as far as I know, your only options are to use a different protocol, use an external relay that you can reach (e.g. ssh tunnel with a server on port 443), or get your network administrator to allow git traffic.

share|improve this answer

See git-config details, you can set proxies for HTTP or GIT protocols.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.