azure-devopsazure-pipelinesmyget

How to setup myget credentials on VSTS build?


How can I set credentials on my Visual Studio Team Services build process for it to access my private MyGet feed? Since it's not working all my builds started to fail. I've read some things online, but they refer to the old way of using nuget, I'm using VS15's default.

I've read these:

Here's the error: enter image description here


Solution

  • Well, I figured it out. The way I solved was:

    1. created a local nuget.config file
    2. Used the commands to save my private feed to that file [1]
    3. Added to source control
    4. Set nuget.config file path on my build definition inside VSO

    [1]

    nuget setapikey [apikey] -source [feedUrl] -configFile [configFilePath]
    nuget sources add|update -Name [name] -source [feedUrl] -User [username] -pass [password] -configFile [configFilePath] -StorePasswordInClearText