GitHub - failed to connect to github 443 windows/ Failed to connect to gitHub - No Error
GitGithubGit Problem Overview
Q - 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 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 Solutions
Solution 1 - Git
Well I did following steps
-
Google the error
-
Got to SO Links(here, here) which suggested the same thing, that I have to update the Git Config for proxy setting
-
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.
-
Found this wonderful tutorial of finding which proxy your are connected to
-
Updated the
http.proxy
key in git config by following commandgit config --global http.proxy http[s]://userName:password@proxyaddress:port
-
Error - "could not resolve proxy
some@proxyaddress:port
". It turned out my password had a@
symbol in it. -
Encode
@
in your password to%40
, because git splits the proxy setting by @ -
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
Solution 2 - Git
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 :)
Solution 3 - Git
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
Solution 4 - Git
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.
Solution 5 - Git
I got so:
git config --global http.proxy http://{domain}\\\{username}:{password}@{proxy ip}:{proxy port}
git config --global http.sslverify false
Solution 6 - Git
(Hope this answer help someone like me.)
The same problem happened to me in Windows using git for windows.
I set proxy setting as usual:
git config --global http.proxy http://username:[email protected]:port
In my situation, the username is email, so it has a @ sign. After encode the @ sign with %40 in username, the problem is resolved.
So, encode the special characters not only in password, but also in username. (Refer to the comments of this answer)
Solution 7 - Git
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
Solution 8 - Git
If you are not using Proxy and still facing this issue, you should use below answer -
> git config --global --unset http.proxy
Simply hit this command, and this will fix the issue.
Solution 9 - Git
ipconfig /renew
- solved this issue for me.
Solution 10 - Git
Was getting the same error in SourceTree,go to Tools>Options>Network and check Add proxy server configuration to Git/Mercurial if you had already set the proxy settings
Solution 11 - Git
On Windows 7 setting the proxy to global config will resolve this issue
> git config --global http.proxy http://user:password@proxy_addr:port
but the problem here is your password will not be encrypted.. Hopefully that should not be much problem as most of time you will be sole owner of your PC.
Solution 12 - Git
Option 1 : Windows specific
Restart your machine
Option 2 : Unset your proxy
git config --global --unset https.proxy
Solution 13 - Git
My problem was solved using this command
git config --global http.proxy http://login:password@proxyServer:proxyPort
Solution 14 - Git
I got an error when I used
<git config --global http.proxy http://user:password@proxy_addr:port>
The error is that the config file cannot be identified as there is no such file. I changed the command to
<git config --system http.proxy http://user:password@proxy_addr:port>
I am running git on the Windows 7 command prompt.
The above command references the config file in GIT_HOME/etc/gitconfig
.
The --global
option does not.
Solution 15 - Git
If using SSH config file, my issue was that ~/.ssh/config
was not specified correct. From Enabling SSH connections over HTTPS
Host github.com
Hostname ssh.github.com
Port 443
Solution 16 - Git
I'm behind a proxy in Windows 10 (and in Windows 11), git 2.32.0.window.1
. This is what worked for me.
Checking What You Have
Check your global configurations using:
$ git config --global --list
You should see the settings for user.name
, user.mail
etc. Having the following lines in place fixed the problem for me:
http.proxyauthmethod=basic
http.proxy=http://username:password@proxyaddress:port
https.proxy=https://username:password@proxyaddress:port
Notice these are settings for both http and https protocols. If you don't see both, you'll have to set them.
Setting The Proxy
Use this line of code in your console, for BOTH protocols:
$ git config --global https.proxy https://username:password@proxyaddress:port
And, if necessary:
$ git config --global http.proxy http://username:password@proxyaddress:port`
If you don't know what the proxy and ports are, look for Internet Options
(or properties) window menu in your Windows System (Control Panel).
Internet Properties (window) → Connections (tab) → LAN Settings (button) → Proxy Server (section) → Advanced (button)
And, remember to replace all values (id est: username
, password
, proxyaddress
, and port
) with the actual ones (in proxyaddress
you'll have to set up an ip number).
Keep in mind that you may need to leave some of those values empties (because they are not required by your proxy). For example, one time I had to set:
git config --global http.proxy http://:@10.1.33.244:81
As you may noticed, no user name or password were needed.
NOTE
If you need to access GitLab, you may need to follow these steps after the ones I've just described: GitLab authentication requires tokens
When you try to clone the repository, you'll be prompted for your GitLab username and password. Instead of entering your regular password, you need to provide a generated token instead. The username is the same.
Solution 17 - Git
Before you try the fancy stuff, try disabling the firewall and antivirus and see if it works. That was my problem.
Solution 18 - Git
For me I have to set the https_proxy
and http_proxy
in addition to git proxy configuration then only it worked.
Solution 19 - Git
Being in a corporate environment, "our" git install used a gitconfig file in it's installation directory, not the standard C:\users<you>.gitconfig file.
This showed me where the gitconfig file is: git config --list --show-origin
Edited the file by adding these:
[remote "origin"]
proxy = http://proxyserver:port
[http]
proxy = http://proxyserver:port
[https]
proxy = http://proxyserver:port
Also, my installation had
[credential]
helper = manager
I can now get to external repos.
Solution 20 - Git
i am using msys2 git behind the firewall, this solution works for me:
> A very simple solution: replace https:// with git:// >
Solution 21 - Git
Late but it should help someone else also like me: What worked for me is a bit convenient but none above said it so I'm adding it:
Solution:
I had to unset both http.proxy
and https.proxy
git --global --unset http.proxy
git --global --unset https.proxy
Solution 22 - Git
(Not an answer, but a very similar problem) I have Git Gui installed on a Windows system behind a proxy. Issuing 'git clone' from a Linux virtual machine running on the Windows system works, but Git Gui yields the 443 error mentioned in the heading.
To fix this, one must edit %USERPROFILE%\.gitconfig to add an [http] section:
[http]
postBuffer = 1000000000
proxy = the.proxy.address:the.proxy.port
sslcainfo = C:/Users/username/Documents/the.certificate.name.cer
Note that the path to the security certificate file has had its backslashes ('') replaced by slashes ('/').
Solution 23 - Git
I am using Tortoise Git and simply going to Git in Settings and applying the same settings to Global. Apply and Ok. Worked for me.
Solution 24 - Git
In Visual Studio go to
Tools/NuGet Package Manager / Package Manager Console
Type git config --global http.proxy http://xxx.xxxx.xxxx:Port