41

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
k_rollo
  • 5,304
  • 16
  • 63
  • 95
Adriang
  • 721
  • 1
  • 6
  • 12
  • 1
    Based on: 1.) If you keep retrying (and presumably with no other changes), it eventually works. And 2.) Works fine from another machine. This leads me to believe the problem is likely not related to Git or Azure, and is instead a networking issue on the problem machine. Maybe touchy wi-fi or a bad network cable? One thing to check, at the exact moment it isn't working, is that machine able to access other things on the internet without any problems? – TTT Apr 23 '21 at 15:37
  • 1
    I'm guessing you're going to say that internet works fine even while the problem is happening... and if so, *intermittent* networking issues could possibly be a bad route somewhere. When the problem is happening, try pinging dev.azure.com and see if you can hit it and get a response. Also try when it's working and compare (both IPs and and response). – TTT Apr 23 '21 at 15:48

9 Answers9

83

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

KyleMit
  • 30,350
  • 66
  • 462
  • 664
28

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

KyleMit
  • 30,350
  • 66
  • 462
  • 664
Grilse
  • 3,491
  • 2
  • 28
  • 35
  • 2
    Thanks a lot to you and @KyleMit. We just experienced this issue with one of our team members as well. We disabled IPv6 on their machine entirely like Kyle suggested, issue was instantly resolved. – René Sackers Dec 02 '21 at 09:51
9

I also noticed turning off IPv6 fixed the issue. However it was actually caused by the wireless driver.

It turned out to be 'Killer Prioritization Engine" which is part of the drivers for the Intel wireless card. Turning this feature off in the 'Killer Intelligence Center' fixed the problem and let me use IPv6.

Kris N
  • 91
  • 1
  • 1
  • This worked for me. Just had the issue after an update to the Killer suite. IPV6 is still enabled. If you have an Intel wireless card, this could be the issue. – csbelli Jul 06 '23 at 19:07
  • I really wasn't expecting to find a solution to this problem but this fixed it exactly. Oddly I would only experience the connection resets from my home network, never from my work network. – keithl8041 Aug 10 '23 at 10:04
6

On Windows 10 and 11, this worked for me:

git config --global --unset https.proxy

git config --global --unset http.proxy

Gedeon
  • 742
  • 9
  • 13
3

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

KyleMit
  • 30,350
  • 66
  • 462
  • 664
k_rollo
  • 5,304
  • 16
  • 63
  • 95
2

This worked for me, still not sure why

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

now commands like git pull and git push will work.

Michael Dimmitt
  • 826
  • 10
  • 23
1

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.

B.McKee
  • 328
  • 1
  • 2
  • 15
1

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

0

I thought this should be updated, as there's also issue for us who are behind a corporate firewall and proxy. PowerShell and/or Terminal need to be configured to accept the proxy configuration before you can connect.

Instructions on how to do this are here: https://learn.microsoft.com/en-us/troubleshoot/azure/devops/git-clone-push-operation-failing-devops-repo?source=recommendations

This worked for me.