Nuget无法为源身份验证的服务索引失败

发布于 2025-01-28 13:03:50 字数 1365 浏览 4 评论 0 原文

由于今天由于某种原因,我无法通过Visual Studio连接到Nuget软件包管理器。

[nuget.org] Unable to load the service index for source https://api.nuget.org/v3/index.json.
  An error occurred while sending the request.
  The underlying connection was closed: An unexpected error occurred on a send.
  Authentication failed because the remote party has closed the transport stream.

但是我不能让它再次工作... 我尝试的东西。

  • Delete NuGet.config
  • Clear NuGet cache
  • Disable TLS1.0 and TLS1.1 explicitly
  • Enabled TLS1.2 explicitly
  • followed the manual from nuget at
  • 不同的Visual Studios
  • 更新到最新的Visual Studio 2019,
  • 尝试了1.0、1.1和1.2的Regedit中不同的TLS设置。我还没有TLS1.3部分。
  • 我可以浏览到 https://api.nuget.org/v3/index.json 使用Chrome

TLS1.2客户设置:

TLS1.2服务器设置:

规格: Windows Server 2012R2,Visual Studio 2019

还在其他Windows Server 2012R2机器上尝试了它,并且

与Windows 10一起在我的笔记本电脑上工作。

希望有人有一个想法。

谢谢

Since today for some reason I'm unable to connect to the NuGet package manager through Visual Studio.

[nuget.org] Unable to load the service index for source https://api.nuget.org/v3/index.json.
  An error occurred while sending the request.
  The underlying connection was closed: An unexpected error occurred on a send.
  Authentication failed because the remote party has closed the transport stream.

But I cannot get it to work again...
Things I tried.

TLS1.2 Client settings:
TLS1.2

TLS1.2 Server settings:
TLS1.2

Specs:
Windows Server 2012R2, Visual Studio 2019

Also tried it on a different Windows Server 2012R2 machine and same problem

It is still working on my laptop with Windows 10.

Hopefully someone has an idea.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

把梦留给海 2025-02-04 13:03:50

我遇到了同样的问题。

解决方案是安装 Microsoft/artifacts-credprovider 如该页面上所述。

Invoke-Expression "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx"

I had the same problem.

The solution was to install the microsoft/artifacts-credprovider as mentioned on that page.

Invoke-Expression "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx"
朕就是辣么酷 2025-02-04 13:03:50

Had exactly the same problem, running script from https://github.com/microsoft/azure-devops-tls12 and following instructions from it helped me.
In my case it generated additional script file, after running that and restaring pc nuget was working once again.

满地尘埃落定 2025-02-04 13:03:50

经典原因之一...

可能的问题:凭证经理中的陈旧文物
您已经在凭据管理器中为您的文物节省了凭据。如果您的系统/SSO凭据最近发生了变化,则会发生这种情况。

解决方案:更新/从凭据管理器中删除保存的凭据
转到Windows =>凭证管理器=> Windows凭据=>通用凭证=> [与文物相关的凭证] =>消除。

当您从Visual Studio重建时,它将再次要求新的证书。无论是要保存还是每次添加。

凭证管理器 - [“]

在vs [“]

one of the classic reason...

Possible Problem: Stale Artifactory Credentials in Credential Manager
You have saved credentials for your artifactory in credential manager. If your system/SSO credentials changed recently then this will happen.

Solution: Update/Remove Saved credentials from Credentials Manager
Go to Windows => Credentials manager => Windows Credentials => Generic Credentials => [Artifactory related Credentials] => Remove.

When you rebuild from visual studio it will again ask for fresh credentials. It's upto you whether want to save or add every time.

Credential manager - [1]

Enter credentials after rebuild in VS [2]

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文