[英]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.