Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git: intermittent failure with remotes "Recv failure: Connection was reset"

After installing Git on the new Windows machine and pulling/pushing to the Azure DevOps remotes (which works fine on other machines) I intermittently get the following error:

Git failed with a fatal error. unable to access 'https://dev.azure.com/...': Recv failure: Connection was reset

And rarely:

Git failed with a fatal error. unable to access 'https://dev.azure.com/...': Send failure: Connection was reset

This happens sporadically - sometimes I get this error many times in a row, and at other times remote sync works OK...

Tried to reinstall Git with and without credential manager and other tweaks to global and repo configs - but nothing seems to resolve this permanently.

like image 623
Oleg Shirokikh Avatar asked Sep 03 '25 16:09

Oleg Shirokikh


2 Answers

Finally, resolved it by disabling IPv6... It was causing issues related to OpenSSL SSL_connect failure.

More important, getting the Git verbose logs has ultimately helped to understand the issue:

GIT_TRACE=1 GIT_TRACE_CURL=1 GCM_TRACE=1 git pull

like image 124
Oleg Shirokikh Avatar answered Sep 05 '25 05:09

Oleg Shirokikh


I hit the same intermittent ssl connection reset errors using a windows git client on a locally hosted gitlab, only this client was affected. I fixed it by changing the sslbackend from schannel to openssl

git config --system http.sslBackend openssl
like image 27
Matt Avatar answered Sep 05 '25 06:09

Matt