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

3 Answers 3

8

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"
Sign up to request clarification or add additional context in comments.

1 Comment

This solved my issues with restoring packages from an internal NuGet repository hosted on Azure from the CLI (which would fail even though VS22' restored without issue).
3

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.

Comments

1

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]

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.