1

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?

Community
  • 1
  • 1

2 Answers2

1

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.

Alex Mullans
  • 1,699
  • 2
  • 17
  • 34
0

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.