gpt4 book ai didi

Azure 开发运营 : Can not load nuget package from feed in Azure Pipeline

转载 作者:行者123 更新时间:2023-12-04 01:35:49 25 4
gpt4 key购买 nike

在我的 Azure DevOps 组织中,我有 2 个项目:项目1:一些工具项目2:我的应用

项目 1 的构建结果发布到项目 1 中的 feed。在 VS2019 中,我可以在项目 2 的应用程序中使用该 feed 中的 nuget 包。当我尝试为项目 2 设置管道时,我无法加载项目 1 中的包。

我的管道看起来像:

steps:
- task: NuGetAuthenticate@0
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: '**/*.sln'
feedsToUse: 'select'
vstsFeed: ***FEED_ID***
- task: VSBuild@1
inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'

nuget 恢复失败并出现以下错误:

##[error]The nuget command failed with exit code(1) and error(Unable to load the service index for source https://***organization***.pkgs.visualstudio.com/***FEED_ID***/_packaging/***PACKAGE_ID***/nuget/v3/index.json.
Response status code does not indicate success: 404 (Not Found - VS800075: The project with id 'vstfs:///Classification/TeamProject/FEED_ID' does not exist, or you do not have permission to access it. (DevOps Activity ID: ...)).

我是否缺少任何配置?

最佳答案

To use packages from a feed in Azure Pipelines, the appropriate build identity must have permission to your feed. By default, the Project Collection Build Service is a Contributor. If you've changed your builds to run at project scope, you'll need to add the project-level build identity as a Reader or Contributor, as desired. The project-level build identity is named as follows:

[Project name] Build Service ([Organization name]) (e.g. FabrikamFiber Build Service (codesharing-demo))

https://learn.microsoft.com/en-us/azure/devops/artifacts/feeds/feed-permissions?view=azure-devops#package-permissions-in-azure-pipelines

关于Azure 开发运营 : Can not load nuget package from feed in Azure Pipeline,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59604192/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com