Skip to main content
Code and think

Using dotnet restore with authentication

You can use dotnet restore command to restore NuGet packages. If package source requires authentication, you can use dotnet restore --interactive.

However, in order for the authentication to work you need additional package called credentials provider. It can be installed using:

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

Afterwards, the dotnet restore --interactive will work.

Reference