Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub - failed to connect to github 443 windows/ Failed to connect to gitHub - No Error

Tags:

git

github

Well I did following steps

  1. Google the error

  2. Got to SO Links(here, here) which suggested the same thing, that I have to update the Git Config for proxy setting

  3. Damn, can not see proxy information from control panel. IT guys must have hidden it. I can not even change the setting to not to use proxy.

  4. Found this wonderful tutorial of finding which proxy your are connected to

  5. Updated the http.proxy key in git config by following command

    git config --global http.proxy http[s]://userName:password@proxyaddress:port
    
  6. Error - "could not resolve proxy some@proxyaddress:port". It turned out my password had a @ symbol in it.

  7. Encode @ in your password to %40, because git splits the proxy setting by @

  8. If your userName is a email address, which has @, also encode it to %40. (see this answer)

     git config --global http.proxy http[s]://userName(encoded):password(encoded)@proxyaddress:port
    

Baam! It worked!

Note - I just wanted to answer this question for souls like me, who would come looking for answer on SO :D


If your git was already set to something and you only copied that folder to some other location, simply run:

git config --global http.proxy ""

And git will set itself straight, after what, you can pull again :)


If your country or working environment blocks sites like Github.

Then you can build a proxy, e.g. use xxnet, which is free & based on Google's GAE, and available for Windows / Linux / Mac.

Then set proxy address for git, e.g:

git config --global http.proxy 127.0.0.1:8087

Mine was fixed by just using this command :-

      >git config --global http.proxy XXX.XXX.XXX.XXX:ZZ

where XXX.XXX.XXX.XXX is the proxy server address and ZZ is the port number of the proxy server.

There was no need to specify any username or password in my case.