'NuGet Unable to load the service index for source Authentication failed
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.
- Delete NuGet.config
- Clear NuGet cache
- Disable TLS1.0 and TLS1.1 explicitly
- Enabled TLS1.2 explicitly
- followed the manual from nuget at https://devblogs.microsoft.com/nuget/deprecating-tls-1-0-and-1-1-on-nuget-org/
- Different Visual Studios
- Update to the latest Visual Studio 2019
- Tried different TLS settings in the RegEdit for 1.0, 1.1 and 1.2. I don't have a TLS1.3 section yet.
- I can browse to https://api.nuget.org/v3/index.json with chrome
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
Solution 1:[1]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Kejim |