Authenticating to VSTS Package Management

霸气de小男生 提交于 2019-12-06 13:45:05
Marina Liu

Actually you can add the credential to the build server for once, then you can connect to VSTS package feed automatically.

For the first time to build on the build server, execute below commands to add credentials and apikey:

nuget.exe sources Add -Name "feedname" -Source "https://account.pkgs.visualstudio.com/_packaging/feed/nuget/v3/index.json" -username name -password password
nuget.exe setapikey vstskey –source feedname

Note: for the added credential, you can use PAT or Alternate credentials.

Then you can connect with the VSTS feed by inputting the source name only. Such as if you want to push a nuget package to the VSTS feed, just use the command:

nuget.exe push –source feedname –apikey vstskey path/to/name.nupkg

Or you can add the nuget.config file (which credentials) into source control, and when use nuget cli, just specify the path of the nuget.config file you used.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!