Skip to content

DotNetCoreRestoreSettings doesn't support keys? #3434

Answered by augustoproiete
mausch asked this question in Q&A
Discussion options

You must be logged in to vote

DotNetCoreRestore is simply a wrapper around dotnet restore that comes with the .NET SDK.

dotnet restore does not support API keys directly. It relies on the existing NuGet sources that you set up previously on the machine (e.g. via dotnet nuget) and/or through a nuget.config file you can add to your repo with your nuget sources.

Option 1: dotnet nuget add source

dotnet nuget add source <nuget server> --name <name> --username xxx --password xxx --store-password-in-clear-text

If you wanted to call dotnet nuget via Cake, you can call via DotNetCoreNuGetAddSource and can use DotNetCoreNuGetHasSource to check if a source already exists before trying to create it. All the dotnet nuget Cake wra…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by mausch
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@nick5454
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants