gitgithub

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


I installed Git to get the latest version of Angular. When I tried to run

git clone https://github.com/angular/angular-phonecat.git

I got:

failed to connect to github 443 error

I even tried

git clone git://github.com/angular/angular-phonecat.git

That gave me

failed to connect no error message

I am behind my company firewall. I can not see my proxy details when I go to Control PanelInternet OptionsConnectionsLAN setting. The IT guys are not sharing proxy information with me. What can do?


I finally managed to do it. I will update the procedure that I had taken in order to. I just wanted to compile all the steps that I did to get it to work.


Solution

  • Well, I did the 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 configuration for proxy setting

    3. Damn, I can not see proxy information from Control Panel. The IT guys must have hidden it. I can not even change the setting to not to use a proxy.

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

    5. Updated the http.proxy key in the Git configuration by the 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 an 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!