Search code examples
gitgithubpushpublish

fatal: unable to access ' ': Failed to connect to github.com port 443 after 21058 ms: Couldn't connect to server


I installed and have been using GitHub Desktop, which was working normally until a few days ago. However, now I am unable to push or publish my files to GitHub using GitHub Desktop. I don't remember what I did that could have caused this issue. When I try to push or publish, I receive an error message:

fatal: unable to access 'https://github.com/.../.../'': Failed to connect to github.com port 443 after 21058ms: Couldn't connect to server.

I am hoping for some assistance in resolving this error, as it is taking me a long time to fix it. Thank you in advance for your help.


Solution

  • If you use the VPN, you can try git config --global http.proxy http://127.0.0.1:7890(7890 is the port of your vpn) and git config --global https.proxy https://127.0.0.1:7890.
    If not you can try git config --global unset http.proxy and git config --global unset https.proxy.