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

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

问题描述

我正在使用 Visual Studio Online - 包管理器预览版以及新的构建系统.包管理器预览版添加了许多构建步骤,包括NuGet Publisher"步骤,该步骤应该将包推送到 Visual Studio Online 托管的私有源.

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.

现在文档在这里有点不合时宜.正如认证文档个人访问令牌.有一些迹象表明,只要您设置了权限(构建服务帐户具有对服务端点和包管理器扩展的权限),就不需要在 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:a1sEventViewerinReleaseProject.Name.1.1.12.0.nupkg -s https://example.pkgs.visualstudio.com/DefaultCollection/_packaging/example/nuget/v3/index.json usfusmx4ez6mlfqwpp2abzc7e37denfcp7bxsep2hqij3tp4qwvq on C:a1sEventViewerinReleaseProject.Name.1.1.12.0.nupkg
2015-11-18T08:35:24.5688946Z C:LRMMSServicesMmsTaskAgentProvisionerToolsagentsdefaultagentworker	oolsNuGet.exe push C:a1sEventViewerinReleaseProject.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 等 3rd 方服务,并期望与 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,而不是服务连接.构建系统依赖于作为提要的读者或贡献者的项目集合构建服务(对于集合范围的构建定义)或项目构建服务(对于此项目"范围的构建定义).所有可用的文档此处.

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 发布者构建步骤失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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