VSTS NuGet package feed authentication

允我心安 提交于 2019-12-07 21:48:54

问题


I'm currently setting up a VSTS account and have been testing a build that packs and pushes a NuGet package to the VSTS packages feed.

I've added the feed url (https://mycompany.pkgs.visualstudio.com/.../v3/index.json) to the Visual Studio "Package Sources" settings, but when I go into (say) the "Manage NuGet Packages for Solution" dialog I am prompted for a username and password.

I've tried downloading the credential provider (CredentialProvider.VSS.exe) from VSTS and have copied it to %LocalAppData%\NuGet\CredentialProviders as detailed here, but I'm still seeing the authentication popup.

What am I missing or doing wrong? I'm using VS2013 and NuGet v3.3, if that makes a difference.


回答1:


Visual Studio 2015 Update 1 and later have built-in support for VSTS feeds.

For Visual Studio 2013, you'll need to manually manage a Personal Access Token in a NuGet.config file. From a command prompt, you can run nuget.exe sources add -name {your feed name} -source {your feed URL} -username {anything} -password {your PAT}. Then, restart Visual Studio and you should be able to access your feed.



来源:https://stackoverflow.com/questions/49363124/vsts-nuget-package-feed-authentication

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