[英]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:我尝试过的事情:
This seems to have something to do with IPv6 - you can disable it by doing the following:这似乎与 IPv6 有关 - 您可以通过执行以下操作来禁用它:
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地址将来可能会发生变化,请验证并根据需要调整。
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:原因未知(并且不再有兴趣挖掘它),但这是对我有用的解决方案:
tracert www.dev.azure.com
tracert www.dev.azure.com
Tracing route to l-0011.l-msedge.net [aaa.bbb.ccc.ddd]
Tracing route to l-0011.l-msedge.net [aaa.bbb.ccc.ddd]
C:\Windows\System32\drivers\etc
C:\Windows\System32\drivers\etc
hosts
file in Notepad++ (Run as Admin to save).hosts
文件(以管理员身份运行保存)。aaa.bbb.ccc.ddd dev.azure.com
aaa.bbb.ccc.ddd dev.azure.com
I can push again after.之后我可以再推。
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 pull
和git 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.