简体   繁体   English

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

[英]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:几个月来,我一直在 Azure 中使用 repo 没有任何问题,但最近当我尝试更新我的遥控器或推/拉时开始间歇性地收到此错误:

OpenSSL SSL_connect: Connection was reset in connection to dev.azure.com:443 OpenSSL SSL_connect:连接已重置连接到 dev.azure.com:443

If I keep retrying, it will eventually work.如果我继续重试,它最终会起作用。 No idea what is causing this.不知道是什么原因造成的。

Things I've tried:我尝试过的事情:

  • Updated Git更新了 Git
  • Turned off firewall关闭防火墙
  • Tried on a different computer with no issues在另一台电脑上试过没有问题

This seems to have something to do with IPv6 - you can disable it by doing the following:这似乎与 IPv6 有关 - 您可以通过执行以下操作来禁用它:

  1. Go to View Network Connections Go 查看网络连接

    查看网络连接

  2. Right click on your current network and select Properties右键单击您当前的网络和 select属性

    网络属性

  3. Deselect IPv6 Internet Prorotcol Version 6取消选择 IPv6 Internet Prorotcol 版本 6

    互联网协议第 6 版

This seems to be related to IPv6.这似乎与 IPv6 有关。 When I disable IPv6, the connection works.当我禁用 IPv6 时,连接正常。 When I re-enable IPv6, it's broken again.当我重新启用 IPv6 时,它又坏了。

I've disabled IPv6 for dev.azure.com by editing my hosts-file.我通过编辑我的主机文件为 dev.azure.com 禁用了 IPv6。 This way, everything works.这样,一切正常。

C:\Windows\System32\drivers\etc\hosts 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. dev.azure.com的IPv4地址将来可能会发生变化,请验证并根据需要调整。

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在cmd提示符下运行: tracert www.dev.azure.com
  2. Prompt shows: Tracing route to l-0011.l-msedge.net [aaa.bbb.ccc.ddd]提示显示: Tracing route to l-0011.l-msedge.net [aaa.bbb.ccc.ddd]
  3. In Windows, navigate to: C:\Windows\System32\drivers\etc在 Windows 中,导航到: C:\Windows\System32\drivers\etc
  4. Modify hosts file in Notepad++ (Run as Admin to save).在 Notepad++ 中修改hosts文件(以管理员身份运行保存)。
  5. Add line: aaa.bbb.ccc.ddd dev.azure.com添加行: aaa.bbb.ccc.ddd dev.azure.com

I can push again after.之后我可以再推。

Further Reading延伸阅读

This seems to be related to IPv6.这似乎与 IPv6 有关。 When I disable IPv6, the connection works.当我禁用 IPv6 时,连接正常。 When I re-enable IPv6, it's broken again.当我重新启用 IPv6 时,它又坏了。

I can't recommend Grilse's post enough (I don't have enough reputation to leave a comment on it or I would have).我不能足够推荐 Grilse 的帖子(我没有足够的声誉来发表评论,否则我会这样做)。 I was seeing this error in VS Code and I tried a whole bunch of recommendations in different posts without success.我在 VS Code 中看到了这个错误,我在不同的帖子中尝试了一大堆建议,但没有成功。

The moment I tried disabling IPv6 on my network adapter the error went away.当我尝试在网络适配器上禁用 IPv6 时,错误就消失了。

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.我的存储库也遇到了同样的问题,但在交换到 github 之前,我将 git bash 更新到版本 2.33.1 并恢复工作。

Dont forget update to git version (2.33.1) Disable protocol IPV6 at your Network Properties不要忘记更新到 git 版本 (2.33.1) 在您的网络属性中禁用协议 IPV6

This worked for me, still not sure why这对我有用,仍然不知道为什么

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

now commands like git pull and git push will work.现在git pullgit push之类的命令将起作用。

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 .我在 Windows 10 中看到了这一点。一时兴起,我进入了我的互联网连接的网络设置,网络配置文件,并从Public更改为Private Git pull worked immediately. Git 拉动立即起作用。

On Windows 10, this worked for me:在 Windows 10 上,这对我有用:

git config --global --unset https.proxy

git config --global --unset http.proxy

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 致命:无法访问“https://github.com/xxx”:LibreSSL SSL_connect: SSL_ERROR_SYSCALL 连接到 github.com:443 - fatal: unable to access 'https://github.com/xxx': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 Fastlane 设置 - 致命:无法读取“https://”的密码<org> @dev.azure.com':终端提示已禁用</org> - Fastlane setup - fatal: could not read Password for 'https://<org>@dev.azure.com': terminal prompts disabled 运行 go mod 时出现错误,例如无法连接到 dev.azure.com? - Getting error while running go mod tidy like unable to connect to dev.azure.com? 无法确定此“dev.azure.com”远程 url 的组织名称 - Cannot determine the organization name for this 'dev.azure.com' remote url OpenSSL SSL_connect:连接被重置连接到 github.com:443 同时尝试 git 推送 - OpenSSL SSL_connect: Connection was reset in connection to github.com:443 while try to git push Git 身份验证错误 dev.azure.com - 但适用于 visualstudio.com - Git Auth Error dev.azure.com - But Works on visualstudio.com git 克隆(使用 ssh)来自 dev.azure.com 突然要求输入密码 - git clone (using ssh) from dev.azure.com suddenly asks for password curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL 连接到 storage.googleapis.com:443 - curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to storage.googleapis.com:443 OpenSSL SSL_connect:SSL_ERROR_SYSCALL 连接到 gitlab.com:443 - OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to gitlab.com:443 SSL_connect:SSL_ERROR_SYSCALL 连接到 github.com:443 - SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM