How to create a NuGet ApiKey with command

270 views Asked by At

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

0

There are 0 answers