Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

Cloning into tracker...
git.gnome.org[0: 209.132.180.173]: 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
add comment

3 Answers

up vote 4 down vote accepted

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

http_proxy=http://your.proxy.server:proxy_port
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
add comment

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):

[core]
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
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

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.