在尝试连接到Nuget时,我得到了下面的错误,然后我无法连接:
无法加载源的服务索引 https://api.nuget.org/v3/index.json。 发送请求时发生错误。 无法连接到远程服务器 连接尝试失败,原因是被连接方在一段时间后没有正确响应,或已建立连接 由于连接的主机未能响应68.232.34.200:443而失败
我可以在浏览器上访问https://api.nuget.org/v3/index.json。
在尝试连接到Nuget时,我得到了下面的错误,然后我无法连接:
无法加载源的服务索引 https://api.nuget.org/v3/index.json。 发送请求时发生错误。 无法连接到远程服务器 连接尝试失败,原因是被连接方在一段时间后没有正确响应,或已建立连接 由于连接的主机未能响应68.232.34.200:443而失败
我可以在浏览器上访问https://api.nuget.org/v3/index.json。
当前回答
如果您看到如下错误,您可能需要设置Azure Artifacts凭据,请参阅Github链接,您可以通过运行powershell脚本或手动安装凭据提供程序。
error : Response status code does not indicate success: 401 (Unauthorized).
其他回答
也许这有帮助
对我来说,删除位于C:\Users\YourNameHere的.nuget文件夹解决了这个问题。
你的一个金块来源可能无法到达。
在撰写本文时,AspNetCore (https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json)似乎有一个过期的证书或已被完全删除。
只需从设置中删除nuget源就可以解决这个问题
如果你使用的是公司代理,并且在Mac上,只需确保你的http/https复选框被选中并应用。
如果使用Visual Studio 2019,如果你在devenv.exe.config中没有使用任何默认代理,只需删除“defaultproxy”部分。在VS 2017中,这个部分没有出现
改变
<defaultProxy enabled="true" useDefaultCredentials="true">
<proxy bypassonlocal="True" proxyaddress="http://<yourproxy:port#>"/>
</defaultProxy>
to
<!--<defaultProxy enabled="true" useDefaultCredentials="true">
<proxy bypassonlocal="True" proxyaddress="http://<yourproxy:port#>"/>
</defaultProxy>-->
否则,提供适当的代理用户名和密码。
去->工具->扩展和更新和卸载NuGet包管理器。重新启动visual studio并重新安装....一切都会恢复正常