VSO NuGet Publisher构建步骤失败 [英] VSO NuGet Publisher Build Step Fails

查看:67
本文介绍了VSO NuGet Publisher构建步骤失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio Online-程序包管理器预览以及新的生成系统。程序包管理器预览添加了许多构建步骤,包括 NuGet Publisher步骤,该步骤应将程序包推送到Visual Studio Online托管的私有feed中。

I am using Visual Studio Online - Package Manager Preview, along with the new build system. The package manager preview adds a number of build steps, including a "NuGet Publisher" step, which should push packages to the private feed hosted by Visual Studio Online.

现在, 此处的文档有点不合时宜。与有关auth的文档个人访问令牌。有迹象表明,只要您设置了权限,就不需要在VSO和程序包管理器之间进行身份验证(构建服务帐户具有对服务端点和程序包管理器扩展的权限)。实际的构建步骤要求您从服务端点列表中进行选择,所以这就是我所尝试的。

Now the documentation is a little out of step here. As is the documentation on auth and personal access tokens. There are some indications that you shouldn't need auth between VSO and the Package Manager as long as you have permissions set up (the build service account has permissions to the service endpoint and to the package manager extension). The actual build step asks you to select from your list of Service Endpoints, so that is what I have attempted.

当我在服务端点上未放置凭据时,我得到了错误:

When I place no credentials on the Service Endpoint, I get the error:

Server Key must be set, set the password on the generic service

当我尝试将API密钥放置在服务端点上时,它似乎在保存时被丢弃了……并且错误更改为:

When I attempt to place the API key against the Service Endpoint it seems to be discarded on save... and the error changes to:

2015-11-18T08:35:24.5678951Z Invoking nuget with push C:\a\1\s\EventViewer\bin\Release\Project.Name.1.1.12.0.nupkg -s https://example.pkgs.visualstudio.com/DefaultCollection/_packaging/example/nuget/v3/index.json usfusmx4ez6mlfqwpp2abzc7e37denfcp7bxsep2hqij3tp4qwvq on C:\a\1\s\EventViewer\bin\Release\Project.Name.1.1.12.0.nupkg
2015-11-18T08:35:24.5688946Z C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\agent\worker\tools\NuGet.exe push C:\a\1\s\EventViewer\bin\Release\Project.Name.1.1.12.0.nupkg -s https://example.pkgs.visualstudio.com/DefaultCollection/_packaging/Example/nuget/v3/index.json usfusmx4ez6mlfqwpp2abzc7e37denfcp7bxsep2hqij3tp4qwvq
2015-11-18T08:35:25.3467312Z Please provide credentials for: https://example.pkgs.visualstudio.com/DefaultCollection/_packaging/Example/nuget/v3/index.json
2015-11-18T08:35:25.3667189Z ##[error]Object reference not set to an instance of an object.
2015-11-18T08:35:25.3677179Z UserName: Password: 
2015-11-18T08:35:25.4647059Z ##[error]Unexpected exit code 1 returned from tool NuGet.exe

我也曾尝试使用个人访问令牌无济于事。

I have also attempted to use a personal access token to no avail.

如何使发布步骤正常工作?

How do I get the publish step working?

推荐答案

内置的NuGet发布任务有两个选择: 外部供稿和内部供稿。外部供稿旨在提供给第三方服务,例如NuGet.org,Artifactory,并期望与API密钥建立服务连接。

The in-box NuGet Publish task has two options: "external" feeds and "internal" feeds. External feeds are intended for 3rd party services like NuGet.org, Artifactory, and expect a service connection with an API key.

内部供稿是由Team Services托管的。您可以添加供稿的NuGet终结点的URL,而不是服务连接。构建系统依赖于Project Collection Build Service(用于集合范围的构建定义)或Project Build Service(用于此项目范围的构建定义)作为提要的读者或贡献者。 此处可用的文档。

Internal feeds are those hosted by Team Services. Instead of a service connection, you add the URL of the feed's NuGet endpoint. The build system relies on the Project Collection Build Service (for collection-scoped build definitions) or Project Build Service (for "this project"-scoped build defs) being a Reader or Contributor to the feed. Docs for all that are available here.

这篇关于VSO NuGet Publisher构建步骤失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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