VSTS NuGet包提要身份验证 [英] VSTS NuGet package feed authentication

查看:147
本文介绍了VSTS NuGet包提要身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在设置VSTS帐户,并且正在测试将NuGet程序包打包并推送到VSTS程序包供稿的版本。

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.

我添加了Feed网址( https://mycompany.pkgs.visualstudio.com/.../v3/index.json )设置为Visual Studio的包来源设置,但是当我进入(说)管理解决方案的NuGet包对话框时,系统会提示我输入用户名和密码。

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.

我尝试从VSTS下载凭据提供程序(CredentialProvider.VSS.exe),并将其复制到%LocalAppData%\NuGet\CredentialProviders 作为这里,但我仍然看到验证弹出窗口。

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.

我错过了什么或做错了什么?我正在使用VS2013和NuGet v3.3,如果有区别的话。

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

推荐答案

Visual Studio 2015 Update 1和更高版本具有

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

对于Visual Studio 2013,您需要在NuGet.config文件中手动管理个人访问令牌。在命令提示符下,您可以运行 nuget.exe源add -name {您的提要名称} -source {您的提要URL}-用户名{anything}-密码{您的PAT} 。然后,重新启动Visual Studio,您应该可以访问供稿。

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.

这篇关于VSTS NuGet包提要身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆