0

So I need a way to create a NuGet ApiKey from the console/command. Basically the idea is to automate a project's nuget package deploy. Ideal steps:

  1. User passes username/password to Jenkins(or sth else, Jenkins is what we use)
  2. Jenkins makes a connection to nuget gallery
  3. Jenkins creates a nuget package with your user
  4. Jenkins creates an ApiKey for the new package
  5. Jenkins saves the ApiKey for future pushes
  6. From now on, every time we need a nuget to be published it's a click of a button with no data needed.
  7. No Username/Passwords are stored.

Everything from that list seems easy except for how to create that ApiKey, all I'm finding is creating it through the UI at https://www.nuget.org/account/apikeys

  • Why don't you have the person log into nuget.org and create the API key, and pass that information to Jenkins in your step 1, rather than the username & password? that makes steps 2 to 4 unnecessary. – zivkan Mar 20 '20 at 16:49
  • @zivkan Task requirements. I guess the reason is that we don't want people to go to many places to set up a full flow. Just go to Jenkins, enter minimal input and your project is automated. – Kristiyan Goleminov Mar 22 '20 at 11:40

0 Answers0