Search code examples
visual-studionugettls1.2

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.

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


Solution

  • 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.