Adriang
Adriang

Reputation: 831

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

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:

Upvotes: 49

Views: 46839

Answers (10)

Muhammad Imran
Muhammad Imran

Reputation: 11

I spent couple of hours to find the solution, but yeah this did work for me

  1. Go to Netowrk connections, right click and disable Internet Protocol Version 6 (TCP/IPV6)

  2. Just update the entry of dev.azure.com in hosts file.

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

13.107.42.20 dev.azure.com

Upvotes: 1

Terence Waters
Terence Waters

Reputation: 41

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.

Upvotes: 1

Kris N
Kris N

Reputation: 121

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.

Upvotes: 12

Gideon
Gideon

Reputation: 1058

On Windows 10 and 11, this worked for me:

git config --global --unset https.proxy

git config --global --unset http.proxy

Upvotes: 7

Michael Dimmitt
Michael Dimmitt

Reputation: 1054

This worked for me, still not sure why

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

now commands like git pull and git push will work.

Upvotes: 2

Vanderson Andrade
Vanderson Andrade

Reputation: 362

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

Upvotes: 1

KyleMit
KyleMit

Reputation: 29829

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

Upvotes: 96

Grilse
Grilse

Reputation: 3887

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

Upvotes: 31

k_rollo
k_rollo

Reputation: 5472

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

Upvotes: 3

B.McKee
B.McKee

Reputation: 430

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.

Upvotes: 1

Related Questions