43

I am unable to clone my repository via HTTPS:

$ git clone https://github.com/walterjwhite/project.configuration.git
Initialized empty Git repository in ./project.configuration/.git/
error: Failed connect to github.com:443; Connection refused while accessing https://github.com/walterjwhite/project.configuration.git/info/refs
fatal: HTTP request failed

I have configured .netrc with my login and password as well as the machine or server I am connecting to.

dimo414
  • 47,227
  • 18
  • 148
  • 244

4 Answers4

80

As you did saw yourself in GitHub support, Scott Schacon himself suggested:

So I guess your .netrc is incorrect or something?
Try removing the info from your .netrc and cloning first (since it's a public repo).

If it isn't a GitHub server issue, it could be your firewall.
And/or your proxy (git config --global http.proxy http://user:password@proxy:xxx).

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Ah, you're right, I forgot that I needed to configure my proxy. –  Aug 19 '10 at 11:37
  • 1
    I still have the problem where it prompts me for my password and enter does not submit my password, it just sits there. git clone https://walterjwhite@github.com/walterjwhite/project.configuration.git –  Aug 19 '10 at 11:42
  • @Walter: did you set your [github token](http://help.github.com/git-email-settings/)? Did you [add the ssh public key to your GitHub account](http://help.github.com/msysgit-key-setup/)? And did you try an https GitHub address? `git clone https://walterjwhite@github.com/walterjwhite/project.configuration.git` – VonC Aug 19 '10 at 12:13
  • Yes, I can work on my github stuff from home just fine. When I go to select coffee shops and work there, I cannot use the SSH method, so I have to use the Smart HTTP proxy. When I copied and pasted the address, stackoverflow took off the https part, but yes, that is what I tried. That is where it hangs, when it prompts me for my password. CTRL+C gets me out. –  Aug 19 '10 at 14:19
  • 6
    To remove the global proxy variable `git config --global --unset http.proxy`. Don't forget the `--global`. Note that this doesn't solve the 403 error, it solve the `fatal: unable to access 'https://github.com/whatever/': Failed connect to github.com:; No error`. *(This error message is buggy indeed: you're connecting to github.com:443, not on your proxy port)*. – KrisWebDev Jul 09 '13 at 11:50
11

Just to add to this discussion, for some reason or another, it seems to work for me when I use http rather than https.

Chris
  • 4,594
  • 4
  • 29
  • 39
  • 3
    On my server I know that this was because I didn't have the proper root certificates for GitHub installed. Once we got these installed https worked fine. – benrifkah Dec 14 '12 at 17:13
2

Just to add you might also check if GitHub's system is healthy at GitHub System Status.

ale
  • 6,369
  • 7
  • 55
  • 65
Gourav Roy
  • 73
  • 5
0

Another possibility that worked without trouble for me was to use the SSH option for clone.

git clone git@github.com:walterjwhite/project.configuration.git

You have to upload an SSH key to Github to use this, but it got me around the https problem.

Sinc
  • 553
  • 1
  • 8
  • 31