Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

How to specify an API Key when publishing to a private nuget source in Azure Devops?

$
0
0

I am trying to publish a NuGet package to a NuGet feed I created in Azure Devops. I have experience in doing these kind of things (I published on NuGet.org) but for some reason I do not understand, it is not working when I try to do this for my employer.

When I click "Connect To Feed", I see this explanation:

enter image description here

This clearly shows where to put my package path and where to put the source. However, it does not show where to put the API key I generated.

But I gave it a try and typed (after generating the package file):

dotnet nuget push --source "Test" --api-key az ClassLibrary1.1.0.0.nupkg

This was not working (401)

enter image description here

I really do not understand this part of the explanation: "API Key (any string will do)". Why possibly "any string will do". I need a valid API key.... Not "any string".

After that I tried to publish in way I have good experience with (when publishing nuget.org public nuget packages). In this statement, the source and key are clearly specified.

Here is how I did it:

enter image description here

Also that does not work. I got a 401 again.

My API key that should give me access (and thus prevents a 401) should be fine. This is how I generated the API key:

enter image description here

Most likely, there is something wrong with the way I specified my API key, not with the API key itself. So how do I specify it correctly in my command-line statement in order to successfully publish my package?


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>