follow me icons

Thursday, January 20, 2011

error: Couldn't resolve host 'github.com' while accessing fatal: HTTP request failed

I am using Msygit 1.7.0.2 on my Windows machine. When I try to git clone a repository in github, I receive the following error


D:\>git clone
https://github.com/giozom/Cucumber-Test-Framework-for-Newbies.git
Initialized empty Git repository in
D:/Cucumber-Test-Framework-for-Newbies/.git/
error: Couldn't resolve host 'github.com' while accessing
https://github.com/giozom/
Cucumber-Test-Framework-for-Newbies.git/info/refs

fatal: HTTP request failed


It turns out I can get the clone to work by using http instead of https


D:\>git clone
http://github.com/giozom/Cucumber-Test-Framework-for-Newbies.git
Initialized empty Git repository in
D:/Cucumber-Test-Framework-for-Newbies/.git/
remote: Counting objects: 22, done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 22 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (22/22), done.


I am not really sure why git clone 'https://' does not work on my Windows machine but I am guessing it's because I don't have a github account.

3 comments:

  1. I was having this problem. You can fix it by creating an environment variable called "https_proxy" with a value of ":"

    It shouldn't have anything to do with not having an account if you're getting a read only copy.

    ReplyDelete
  2. Thanks for the info Fudge.

    ReplyDelete
  3. hello Fudge, how can create an environment variable called "https_proxy" with a value of ":" to resolve this problem? thanks.

    ReplyDelete