简体   繁体   English

奇怪的行为从 azure devops 管道中的本地提要恢复 package

[英]Strange behavior restore package from local feed in azure devops pipeline

I've a strange problem.我有一个奇怪的问题。 I try to restore a .net core application with do.net restore command in Azure pipeline.我尝试在 Azure 管道中使用 do.net restore 命令恢复 .net 核心应用程序。 One of my package is on my local feed (repo and feed are in same azure devops project).我的 package 之一在我的本地提要上(repo 和提要在同一个 azure devops 项目中)。 With classic editor (UI editor) I've no problem but with yaml file restore is unable.使用经典编辑器(UI 编辑器)我没问题,但使用 yaml 文件无法恢复。 I've the error: error NU1301: Unable to load the service index for source我有错误:错误 NU1301:无法加载源的服务索引

I export yaml from classic editor and copy it in a new yaml pipeline file but build faild also... The configuration of restore task is the same but it doesn't work with yaml.我从经典编辑器中导出 yaml,并将其复制到新的 yaml 管道文件中,但构建也失败了...恢复任务的配置相同,但不适用于 yaml。

What is stranger is that the restore task worked friday (with yaml) but fail since yesterday without changes...奇怪的是,恢复任务在周五(使用 yaml)工作,但从昨天开始失败,没有任何变化......

I'don't undersand anything... Who would have an idea?我什么都不懂……谁会有想法?

Thanks谢谢

(The agent is an azure agent) (代理为azure代理)

The content of yaml file: yaml文件内容:

jobs:
  - job: Job_1
    displayName: Agent job 1
    pool:
      vmImage: windows-2019
    steps:
      - checkout: self
        fetchDepth: 1
      - task: DotNetCoreCLI@2
        displayName: "dotnet restore"
        inputs:
          command: restore
          projects: '**\*.sln'
          vstsFeed: "afcdef6a-5c72-4a0e-90c5-33d9e751869c/ab1da1d1-3562-4a0a-9781-4f4d80de93ba"

For Classic pipeline, your Build job authorization scope may be Project Scope(Current project) Classic Pipeline Options对于经典管道,您的构建作业授权 scope 可能是项目范围(当前项目)经典管道选项

When you use yaml pipeline, the Build job authorization scope is defined by Project setting->Limit job authorization scope to current project for non-release pipelines Project Settings当您使用 yaml 管道时,构建作业授权 scope 由项目设置定义 -> 将作业授权 scope 限制为非发布管道的当前项目项目设置

If it is off, the build job authorization scope is Organization Scope (Project Collection)如果关闭,则构建作业授权 scope 为组织 Scope(项目集合)

If it is on, the build job authorization scope is Project Scope (Current project)如果打开,则构建作业授权 scope 为项目 Scope(当前项目)

You could try to add Project Collection Build Service (OrgName) to Feed setting->Permissions.您可以尝试将 Project Collection Build Service (OrgName) 添加到 Feed setting->Permissions。 Feed settings饲料设置

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用私有包源在 Azure DevOps 中构建的 Dotnet 无法从私有 nuget 源恢复 - Dotnet build in Azure DevOps with private package source cannot restore from private nuget feed Nuget 恢复在 Azure Devops 中无法使用工件提要 - Nuget restore not working with artifact feed in Azure Devops Azure DevOps Pipeline 上的 Nuget 还原失败 - Nuget Restore fails on Azure DevOps Pipeline 从构建或发布管道在 azure devops 中发布 nuget 包 - Publish nuget package in azure devops from build or release pipeline 在 Azure DevOps Build Pipeline 中恢复 Libman JS 库 - Restore Libman JS Libraries in Azure DevOps Build Pipeline Azure DevOps Pipeline dotnet ef 迁移因本地工件而失败 - Azure DevOps Pipeline dotnet ef migrations fails with local artifacts 由于 Nuget 工件源上的 URL 格式错误,Azure DevOps dotnet 还原任务失败 - Azure DevOps dotnet restore task fails due to wrong URL format on Nuget artifact feed 使用 Azure DevOps Artifact 时无法在 Build Pipeline 中执行“dotnet tool restore --interactive” - Fail to execute "dotnet tool restore --interactive" in Build Pipeline when using Azure DevOps Artifact Azure DevOps 管道在恢复时失败 - 测试项目与 netcoreapp2.2 不兼容项目支持:netcoreapp3.0 - Azure DevOps pipeline fails at Restore - Test project is not compatible with netcoreapp2.2 Project supports: netcoreapp3.0 Azure DevOps 管道部署问题 - Azure DevOps pipeline issue on deploy
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM