fatal: unable to access 'https://github.com/XXX/XXXXX.git/': OpenSSL SSL_connect: Connection was reset in connection to github.com:443
Suddenly I'm getting above error while I try to git pull, git push, or clone the repo.
fatal: unable to access 'https://github.com/XXX/XXXXX.git/': OpenSSL SSL_connect: Connection was reset in connection to github.com:443
Suddenly I'm getting above error while I try to git pull, git push, or clone the repo.
I also encountered a similar situation; that's when I came across an answer on Code Grepper by Shibbir Ahmed, where he provided this:
git config --global --unset-all remote.origin.proxy
That solved the issue for me.
When I couldn't use my VPN Apps because it doesn't connect in Iran at the moment, I used GitHub desktop.
As Iranian Govenment has recently blocked OpenSSL protocol in most ISPs, we have to switch from HTTPS
to SSH
or use Github Desktop (This solution is just for Iranian people like me!).
I recommend installing GitHub Desktop
if you can. I couldn't install it since I want to use GIT
in the terminal. So, I switched from HTTPS
mode to SSH
mode using this command (Reference):
git config --global url."git@github.com:".insteadOf "https://github.com/"
Then I created an SSH key and added it to ssh agent using this tutorial on github.
Also, to test your ssh key, you can use (Reference):
ssh -T git@github.com
Based on the link.
In the case of the Iran SSL ban, it is possible to run a proxy on the arbitrary free port on your localhost and then reconfigure the git proxy setting. For example, I use the Psiphon to run a proxy by changing the setting shown in the image:
Run the command:
git config --global --add remote.origin.proxy "127.0.0.1:1089"
Try again by using a VPN.
If it doesn't work or you don't have access to any VPN, take your chance by using SSH instead of HTTPS as following steps:
Generate a new ssh key with a passphrase if you don't already have one.
Clone the repository using SSH.
Now if you're lucky, the pull
, push
, and other git commands should work.
This worked for me:
git config --global http.sslBackend schannel
generally fatal errors are related to network connection, you can use VPN or proxy on you'r system.
In the Visual Studio (2022) go to:
Tools > Options > Source Control > Git Global Settings > Cryptographic Network Provider > Secure Channel
I was getting an error in that format from many FOSS tools. I solved the problem by temporarily disabling my anti-virus, Kaspersky. (I wouldn't name it publicly but I already told it not to "scan" secure connections so there's no reasonable explanation for this problem.)
use this steps will fix that
first run this
gh auth login
then chose GitHub.com then write y and press enter select SSH and continue the steps
good lock
In my case, the issue was an expired token. Just generate a new token (if this is auth form you're using) and you'll be good to go.
On the github.com website, go to Settings / SSH and GPG Keys -> New SSH Key. Add your public SSH key from your computer. You can find the string for this e.g. under Windows in the path C:\Users\User.ssh or under Linux in the path /home/admin/.ssh in the file id_rsa.pub
.
In my Case below method works: execute below command under angular root path:
git config user.name "<User Name>"
git config user.email "<Authenticate Email ID>"
after executing above command into my VS code allow me to commit the changes.