我偶尔会收到此错误。这确实很烦人,因为有时它会自行修复,但是大多数情况下,我只需要关闭VS并重新打开,然后它又会工作一段时间。
当我尝试从分支(或任何其他git网络交互)中提取时,就会发生这种情况。
Error encountered while fetching: An error occurred while sending the request.
Inner Exception:
The remote name could not be resolved: 'github.com'
其他人遇到过这个问题吗?您是如何解决的?
我也在使用两因素验证。如果那是问题。(似乎不是问题)
有时在启动VS时也会收到此错误:
We were unable to automatically populate your Visual Studio Team Services accounts.
The following error was encountered: TF400813:
Resource not available for anonymous access. Client authentication required.
因此,也许是在交互过程中的某个时刻丢失了github.com身份验证,然后重新启动VS对其进行了修复。
另一个线索是,当无法访问github.com时,无法在Visual Studio的浏览器中将其浏览到。可以在Chrome(或FireFox或IE)中浏览它。Visual Studio似乎也偶尔会失去与nuget.org的连接,效果似乎是相同的。
可能的相关问题:Visual Studio / C#:Nuget无法连接到远程服务器
更新:这发生在两个不同的ISP上,并且其中一个不在公司防火墙上(这排除了网络问题)。当问题发生时,它实际上关闭了Visual Studio内部的所有网络通信,因此,这不仅仅是github.com问题。我有一张与Microsoft合作的票证,希望我们能解决它,并且我可以将答案发布给每个人。
在Microsoft支持和VS 2017版本之间来回交流。
答案是升级!
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句