GitHub - failed to connect to github 443 windows/

2019-01-02 19:46发布

Q - I intalled git to get the latest version of Angular. When i tried called

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 panel->Internet Options -> connections -> lan setting.IT guys are not sharing proxy information with me. I do not know what to do ??

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

标签: git github
20条回答
人间绝色
2楼-- · 2019-01-02 19:52

I have wide experience working with corporate proxies. Configuration is usually working well with

But if you have configured the proxy and it's impossible to work with git (always getting 443 error) try to check if you have a remote.origin.proxy bypassing your configuration.

git config --list --show-origin

If you check that "remote.origin.proxy" is configured as empty value try to unset it or almost set it with your corporate proxy:

git config --add remote.origin.proxy "http://[yourproxy]:[yourport]"

And since several enterprise sites have untrusted certificates I recomend you to avoid certificate checking if you are using ssl:

git config http.sslverify false    
git config --global http.sslverify false
查看更多
裙下三千臣
3楼-- · 2019-01-02 19:54

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 :)

查看更多
骚的不知所云
4楼-- · 2019-01-02 19:54

If you're on Windows then it could be the firewall. I had this issue arise after an update from Windows that, for some reason, blocked all programs from accessing the net unless they were added to the allow list in the firewall.

To test, disable your firewall and pull something from Github, enable the firewall again. If that works, then go through C:\Program Files\Git or C:\Program Files\Git and add them to the allow list in your firewall.

查看更多
看淡一切
5楼-- · 2019-01-02 19:56

My problem was solved using this command

git config --global http.proxy http://login:password@proxyServer:proxyPort
查看更多
有味是清欢
6楼-- · 2019-01-02 19:58

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

  1. Error - could not resolve proxy some@proxyaddress:port. It turned out my password had @ symbol in it.

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

  3. 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

查看更多
孤独寂梦人
7楼-- · 2019-01-02 19:59

For me I have to set the https_proxy and http_proxy in addition to git proxy configuration then only it worked.

查看更多
登录 后发表回答