fatal: unable to access 'https://dev.azure.com/xxx': OpenSSL SSL_connect: Connection was reset in connection to dev.azure.com:443

Viewed 18767

I've been working with a repo in Azure for months without any issue, but recently started getting this error intermittently when I try to update my remotes or push/pull:

OpenSSL SSL_connect: Connection was reset in connection to dev.azure.com:443

If I keep retrying, it will eventually work. No idea what is causing this.

Things I've tried:

  • Updated Git
  • Turned off firewall
  • Tried on a different computer with no issues
7 Answers

This seems to have something to do with IPv6 - you can disable it by doing the following:

  1. Go to View Network Connections

    View Network Connections

  2. Right click on your current network and select Properties

    Network Properties

  3. Deselect IPv6 Internet Prorotcol Version 6

    Internet Prorotcol Version 6

This seems to be related to IPv6. When I disable IPv6, the connection works. When I re-enable IPv6, it's broken again.

I've disabled IPv6 for dev.azure.com by editing my hosts-file. This way, everything works.

C:\Windows\System32\drivers\etc\hosts

# Workaround for git connection errors
# fatal: unable to access 'https://dev.azure.com/MyOrg/my-project/_git/my-repo/': OpenSSL SSL_connect: Connection was reset in connection to dev.azure.com:443
# https://developercommunity.visualstudio.com/t/cannot-connect-to-devazurecom-nor-azuremicrosoftco/1189016
13.107.42.20  dev.azure.com

The IPv4 address of dev.azure.com may change in the future, please verify it and adjust as necessary.

Further Reading

Problem randomly showed up when everything was working fine the minute before:

$ git push origin master
fatal: unable to access 'https://dev.azure.com/xxx': OpenSSL SSL_connect: Connection was reset in connection to dev.azure.com:443

The cause is unknown (and no longer interested to dig that up) but this is the solution that worked for me:

  1. Run in cmd prompt: tracert www.dev.azure.com
  2. Prompt shows: Tracing route to l-0011.l-msedge.net [aaa.bbb.ccc.ddd]
  3. In Windows, navigate to: C:\Windows\System32\drivers\etc
  4. Modify hosts file in Notepad++ (Run as Admin to save).
  5. Add line: aaa.bbb.ccc.ddd dev.azure.com

I can push again after.

Further Reading

This worked for me, still not sure why

git fetch --all;
git pull --all;

now commands like git pull and git push will work.

I was the same problem with my repositories but before exchange to github i updating git bash to version 2.33.1 and back to work.

Dont forget update to git version (2.33.1) Disable protocol IPV6 at your Network Properties

On Windows 10 and 11, this worked for me:

git config --global --unset https.proxy

git config --global --unset http.proxy

I'm seeing this in Windows 10. On a whim I went into Network Settings for my internet connection, Network profile, and changed from Public to Private. Git pull worked immediately.

Related