user6481641
user6481641

Reputation: 11

Automate Credential creation on build servers for VSTS Nuget feeds

We are in a state of having both on premises TFS as well as utilizing VSTS. Mainly nuget feeds, but some source is migrating.

In the meantime getting/publishing nuget feeds is happening on our on premises build servers. I was able to run their Auth tool which gave one server a vss token to get and publish to VSTS, but that takes me through the GUI login for VSTS. I know nuget supports this new Credential management tool, but I've not found a way to script that yet.

Is there an automated way, powershell preferably, to provide the VSTS to publish packages? Or did I miss something obvious?

Upvotes: 1

Views: 514

Answers (2)

Alex Mullans
Alex Mullans

Reputation: 1739

In a build environment, using the VSTS Auth Helper is the right way to go. You'll want to use the -NonInteractive flag to avoid the web prompt.

If your organization has enabled two-factor authentication, the build service account will need an exception for the -NonInteractive flag to work.

Upvotes: 1

Harikrishna Menon A
Harikrishna Menon A

Reputation: 455

Yes this is supported through a combination of Visual Studio Credential Provider and nuget.exe. Detailed instrcutions on how to enable this is given is give here.

Upvotes: 0

Related Questions