Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm simply trying to clone a repository from github, but I think my problem spans greater than git or github. I've tried the following methods:

sudo wget 'http://github.com/symfony/symfony/tarball/master

--2010-07-30 07:51:36--  'http://github.com/symfony/symfony/tarball/master
Resolving github.com...
Connecting to github.com||:80... connected.
HTTP request sent, awaiting response... Read error (Connection reset by peer) in headers.

--2010-07-30 07:51:38--  (try: 2)  'http://github.com/symfony/symfony/tarball/master
Connecting to github.com||:80... connected.
HTTP request sent, awaiting response... Read error (Connection reset by peer) in headers.

--2010-07-30 07:51:40--  (try: 3)  'http://github.com/symfony/symfony/tarball/master
Connecting to github.com||:80... connected.
HTTP request sent, awaiting response... Read error (Connection reset by peer) in headers.

Since wget wasn't working, I figured I'd try using git (knowing that my firewall was probably blocking the git protocol). As you can see, it looks like the firewall did block it.

sudo git clone git://github.com/symfony/symfony.git

Initialized empty Git repository in /home/myname/symfony/.git/

github.com[0:]: errno=Connection refused
fatal: unable to connect a socket (Connection refused)

Since, the git protocol didn't work I figured I'd try the http method.

sudo git clone 'http://github.com/symfony/symfony.git

Initialized empty Git repository in /home/myname/symfony/.git/
error:  while accessing 'http://github.com/symfony/symfony.git/info/refs

fatal: HTTP request failed

So I figured I'd try another method of getting a file from the internet, but to no avail.

sudo curl www.google.com

curl: (56) Failure when receiving data from the peer

So then I tried pinging just to make sure that I see the outside world, and it works!

ping www.google.com

PING www.l.google.com ( 56(84) bytes of data.
64 bytes from qy-in-f104.1e100.net ( icmp_seq=1 ttl=49 time=46.4 ms
64 bytes from qy-in-f104.1e100.net ( icmp_seq=2 ttl=49 time=46.5 ms
64 bytes from qy-in-f104.1e100.net ( icmp_seq=3 ttl=49 time=46.5 ms

--- www.l.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 46.477/46.499/46.512/0.176 ms

apt-get install works successfully. Does apt-get use a different protocol other than http or does it use different ports other than 80?

I should mention that I'm using a VMware installation of Kubuntu 10.04. Has anyone ever encountered a problem like this? What other methods could you think of to narrow down where the problem is coming from?

Note: I had to add a single quote (') before each hyperlink in this post since I don't have enough rep.

@uloBasEI What was returned is below (minus the HTML of google's homepage)

HTTP/1.0 200 OK
Date: Fri, 30 Jul 2010 16:13:45 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
Set-Cookie: PREF=ID=217dc6a999f1ffaf:TM=1280506425:LM=1280506425:S=gnL_tcT4FJLh9Cgh; expires=Sun, 29-Jul-2012 16:13:45 GMT; path=/; domain=.google.com
Set-Cookie: NID=37=fIVPDdQeoCyfwgmhtAGDf06le4T450U4v19oMdSBCQQDe67Ys5bHwMaGsnywEjUkGSk0Ex5BRGFDouO5Fsme0uARoU3uTNmeTzKfi4mq-L8jDOtcBTC88cCDg0DSpjBr; expires=Sat, 29-Jan-2011 16:13:45 GMT; path=/; domain=.google.com; HttpOnly
Server: gws
X-XSS-Protection: 1; mode=block
share|improve this question
Is there a transparent proxy between you and the web, and if so, do you know what software it is? Do you have any trouble outside the VM? I've seen misbehaving http connections on Linux inside Virtualbox (though with different symptoms: clients other than firefox didn't detect the end of the connection and just hung there even though they'd received all the data). Unfortunately I couldn't figure out the problem. It may be instructive to observe traffic with tcpdump or wireshark. –  Gilles Jul 30 '10 at 18:59
wireshark is showing that there are a lot of TCP RST packets. –  blastthisinferno Aug 2 '10 at 13:26
Are there any other computers, perhaps using different operating systems (not that I think this has anything to do with ubuntu!) you could try? Does downloading the git repo in your browser offer a sufficient workaround? –  Clinton Blackmore Aug 11 '10 at 20:24
I'm SSH 'ing into the system I am trying to do this with. I can't really use a browser anymore. Another reason I'd like to figure this problem out is because I think it is the same reason python easy_install doesn't work, and I want to get that working as well. –  blastthisinferno Aug 12 '10 at 12:35
add comment

6 Answers

In order to know which protocol apt-get is using, you can have a look at the file /etc/apt/sources.list. Packages can be coming from a cd-rom, a ftp server, a http server, etc.

Have you tried opening a webpage with telnet to have a look at the entire HTTP response? For instance:

$ telnet www.google.com 80
GET / HTTP/1.0
share|improve this answer
add comment
up vote 1 down vote accepted

The problem partly had to do with proxy settings. Now, I had set the proxy environment variable

export http_proxy="http://IP ADDRESS:PORT"

before with no luck, but after restarting the computer, several other solutions failed because I didn't add the environment variable again. I was attempting to clone the git repository in /var/local/git. After a long time of not being able to do what I want, I started trying random solutions, and eventually tried cloning the git repository to /home/myusername/git. To my surprise, the repo started downloading! So, what was the difference?

I performed a ls -la on /var/local/git and /home/myusername/git, and the results were

>>$ ls -la /var/local/git/
total 12
drwxr-sr-x 3 root staff 4096 2010-08-18 09:17 .
drwxrwsr-x 5 root staff 4096 2010-07-07 15:27 ..
drwxrwxr-x 4 root root  4096 2010-08-14 13:59 symfony
>>$ ls -la /home/myusername/git
total 432
drwxr-xr-x  3 myusername myusername 4096 2010-08-18 09:20 .
drwxr-xr-x 29 myusername myusername 4096 2010-08-18 09:18 ..
drwxr-xr-x  5 myusername myusername 4096 2010-08-18 09:21 symfony

So, it turns out, I guess this is a lesson on permissions. I'm guessing the problem had something to do with the 's' permission in /var/local/git, but from what I've read I cannot tell why that would be the cause of my problems.

Does anyone know if this is a legit answer, or does it sound like something else was at work here?

share|improve this answer
add comment

Try removing VMware tools. I've had an issue in the past where no traffic (TCP or UDP) besides ICMP would flow. I TCPdumped on the firewall and router and saw the traffic going out, but the network driver provided by vmware tools was corrupting the packet in some way.

share|improve this answer
I removed VMware tools, but wget still isn't able to download anything. –  blastthisinferno Aug 5 '10 at 12:56
add comment

If there are many RST packets being received, it's possible that your network connection is faulty. A bad wire, interference, etc. There have also been cases of ISPs forging RST packets to disrupt P2P networks.

share|improve this answer
The only RST packets being received are after I issue a command such as wget. All other traffic is fine. –  blastthisinferno Aug 9 '10 at 14:04
add comment

Do you have apt-get specific proxy settings? These would be stored in /etc/apt/apt.conf or in /etc/apt/apt.conf.d/

share|improve this answer
I don't see any proxy settings. The files I have in /etc/apt/apt.conf.d are 00trustcdrom 01autoremove 01ubuntu 05aptitude 10periodic 15update-stamp 20archive 20packagekit 50unattended-upgrades 70debconf 99update-notifier. In none of them do I see proxy configuration, but perhaps I'm missing something you know of? –  blastthisinferno Aug 11 '10 at 18:57
What about /etc/apt/apt.conf itself? –  chrisjrob Aug 19 '10 at 16:26
add comment

This doesn't directly answer the git question, but, you are able to surf the web (and download pages) just fine through your browser, right? Possibly someone is disallowing certain user agents. I would test by finding out what your browser's user agent string is and then supplying the --user-agent parameter to wget or curl.

share|improve this answer
Damn, sounded promising, but didn't work. I tried wget -U="" www.google.com and wget -U="Chrome/5.0.375.125" www.google.com with the same issue as before. –  blastthisinferno Aug 11 '10 at 18:47
Darn. I really had hoped that would work. I am am able to use curl to get www.google.com and github.com/symfony/symfony/tarball/master , which does tend to confirm that it is something between you and those sites. –  Clinton Blackmore Aug 11 '10 at 20:21
add comment

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.