I want to publish to my TeamCity (v9) NuGet (v2.83) feed, using the TeamCity Publish build step.
But it is asking for the API key which no one knows?
I have seen %teamcity_nuget_api_key_1234567890123% TeamCity parameter about, but it didn't seem to work?
I do not have admin access to TeamCity, so it may be on a page I cannot see.
Can anyone help?
EDIT for clarity: I am using TeamCity as my NuGet Server.
Sign into your nuget.org account or create an account if you don't have one already. Select your user name at upper right, and then select API Keys. Select Create, and provide a name for your key.
The API key acts as an alias for the user account, so the same API key is used for all NuGet repositories within the repository manager. This user-specific key is generated separately by a user and can be regenerated at any time. At regeneration, all previous keys generated for that user are invalidated.
Assuming you're using the internal TeamCity NuGet feed, you don't need to use the NuGet Publish build step; simply use NuGet Pack and choose to publish them as build artifacts. This will automatically publish them on the internal feed. Alternatively, if you have already created packages by some other means, you can simply publish them as build artifacts using General Settings -> Artifact Paths.
If you're trying to publish to an external feed, such as nuget.org, then the API key is externally managed and you'll need to 1) locate the API key from whoever manages the subscription to the feed, and 2) plug it into your build configuration.
Lots of information available in the online doco.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With