4

I know this issue is not new, I kept looking for the answer but until now nothing worked for me.

The issue is that each time I try a git clone or git pull command, I receive the following error:

error: Failed connect to github.com:8080; Connection refused while accessing https://github.com/mxcl/homebrew.git/info/refs?service=git-upload-pack
fatal: HTTP request failed

(Here its https://github.com/mxcl/homebrew.git/info/refs?service=git-upload-pack but it is just an example, I have this issue whith all URLs)

Wooble
  • 87,717
  • 12
  • 108
  • 131
lgerard
  • 117
  • 1
  • 2
  • 10
  • 1
    Port 8080 is not typically associated with https:// urls. 8443 is what I'd expect to see here, if it HAD to be something other than 443. – ta.speot.is Apr 23 '13 at 11:20
  • Try `git://github.com/mxcl/homebrew.git`? – James M Apr 23 '13 at 11:21
  • Actually I tried "git clone git://github.com/mxcl/homebrew.git" and it worked whereas "git clone https: //github.com/mxcl/homebrew.git/info/refs?service=git-upload-pack" keeps returning the same error...Any idea where does the issue could come from? – lgerard Apr 23 '13 at 11:45
  • Well, `git clone https://github.com/mxcl/homebrew.git` is the correct command. `git clone https://github.com/mxcl/homebrew.git/info/refs?service=git-upload-pack` is simply not the correct syntax. I would have expected a better error message, but I wouldn't have expected it to clone the repository. – Edward Thomson Apr 23 '13 at 13:11

2 Answers2

5

Check if you've got git http.proxy or https.proxy configuration set, and unset both. See pull command error : Failed connect to github.com:8080

Community
  • 1
  • 1
Joost Diepenmaat
  • 17,633
  • 3
  • 44
  • 53
  • I have already tried that. It is weird because even if I follow the process (unset both http & https), it keeps returning me an http.proxy setting (kuzh.polytechnique.fr:8080) and no https.proxy (which should be the right thing, no?) – lgerard Apr 23 '13 at 11:54
  • Thanks! I forgot I recently configured git to work through a proxy. :P – Sheharyar Mar 03 '14 at 15:25
0

Try to set public/private rsa key pair before push or pull.

ssh-keygen -t rsa -C "youremailid@xxxx.com"

enter image description here

Prashanth Sams
  • 19,677
  • 20
  • 102
  • 125