简体   繁体   中英

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. One of my package is on my local feed (repo and feed are in same azure devops project). With classic editor (UI editor) I've no problem but with yaml file restore is unable. I've the error: error NU1301: Unable to load the service index for source

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.

What is stranger is that the restore task worked friday (with yaml) but fail since yesterday without changes...

I'don't undersand anything... Who would have an idea?

Thanks

(The agent is an azure agent)

The content of yaml file:

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

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

If it is off, the build job authorization scope is Organization Scope (Project Collection)

If it is on, the build job authorization scope is Project Scope (Current project)

You could try to add Project Collection Build Service (OrgName) to Feed setting->Permissions. Feed settings

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM