Release pipeline fails to download artifacts from multiple private GitHub repositories

Nikolay Gurinov 0 Reputation points
2025-04-29T15:29:38.2633333+00:00

We are experiencing a critical issue in Azure DevOps Release pipelines when using multiple private GitHub repositories as artifact sources.

Working scenarios:

  • Existing (older) release pipelines that reference 2 or more private GitHub repositories continue to work without issues.
  • A new release pipeline with only one private GitHub repository as an artifact works correctly.
  • A new release pipeline with 2 or more public GitHub repositories works correctly.

Failing scenarios:

  • Adding a new private GitHub repository to an existing release pipeline with other private GitHub repositories causes the release to fail during artifact download, even if the previously added repos still work.
  • Creating a new release pipeline and adding 2 or more private GitHub repositories as artifacts causes the pipeline to fail with the following error:
2025-04-29T13:52:50.8898897Z ##[error]Downloading artifacts failed: System.InvalidOperationException: NotFound
   at Microsoft.VisualStudio.Services.Agent.Worker.Release.Artifacts.GitHubHttpClient.GetUserRepo(String accessToken, String repositoryName) in /mnt/vss/_work/1/s/src/Agent.Worker/Release/Artifacts/GitHubHttpClient.cs:line 36
   at Microsoft.VisualStudio.Services.Agent.Worker.Release.Artifacts.GitHubArtifact.GetArtifactDetails(IExecutionContext context, AgentArtifactDefinition agentArtifactDefinition) in /mnt/vss/_work/1/s/src/Agent.Worker/Release/Artifacts/GitHubArtifact.cs:line 108
   at Microsoft.VisualStudio.Services.Agent.Worker.Release.ReleaseJobExtension.<>c__DisplayClass47_0.<ConvertToArtifactDefinition>b__1() in /mnt/vss/_work/1/s/src/Agent.Worker/Release/ReleaseJobExtension.cs:line 509
   at Microsoft.VisualStudio.Services.Agent.Worker.Release.RetryExecutor.Execute(Action action) in /mnt/vss/_work/1/s/src/Agent.Worker/Release/RetryExecutor.cs:line 41
   at Microsoft.VisualStudio.Services.Agent.Worker.Release.ReleaseJobExtension.ConvertToArtifactDefinition(AgentArtifactDefinition agentArtifactDefinition, IExecutionContext executionContext, IArtifactExtension extension) in /mnt/vss/_work/1/s/src/Agent.Worker/Release/ReleaseJobExtension.cs:line 506
   at Microsoft.VisualStudio.Services.Agent.Worker.Release.ReleaseJobExtension.DownloadArtifacts(IExecutionContext executionContext, IList`1 agentArtifactDefinitions, String artifactsWorkingFolder) in /mnt/vss/_work/1/s/src/Agent.Worker/Release/ReleaseJobExtension.cs:line 257
   at Microsoft.VisualStudio.Services.Agent.Worker.Release.ReleaseJobExtension.DownloadArtifactsAndCommitsAsync(IExecutionContext executionContext, Object data) in /mnt/vss/_work/1/s/src/Agent.Worker/Release/ReleaseJobExtension.cs:line 130
2025-04-29T13:52:50.8927104Z ##[error]NotFound

 Additional details:

  • The GitHub service connection used is the same across all pipelines (both working and failing).
  • The service connection has sufficient permissions and the repos are visible in the UI when selecting the artifact.
  • The default branch and version are correctly set.
  • All tested GitHub repositories contain commits and valid HEAD references.
  • The issue has been reproduced using:
    • Microsoft-hosted agents: ubuntu-latest and windows-latest
    • Self-hosted agents on Windows
  • Agent version used in all cases: 4.254.0

This behavior suggests a regression or limitation in the handling of multiple private GitHub repositories as artifacts in newly created release pipelines, or possibly a breaking change in how GitHub artifacts are retrieved in recent versions of the Azure DevOps agent or backend services.

We kindly ask the Azure DevOps support team to investigate this inconsistency and confirm:

•	Is this a known issue or intentional limitation?

•	Are there any workarounds (e.g. enforced usage of GitHub Releases, artifact proxying through build pipelines)?

•	Will this be addressed in a future update?
Azure DevOps
{count} votes

1 answer

Sort by: Most helpful
  1. Sirra Sneha 550 Reputation points Microsoft External Staff Moderator
    2025-05-09T07:08:47.06+00:00

    Hi @Nikolay Gurinov,

    This appears to be a recent regression, as previously created Release pipelines with multiple private GitHub repositories continue to function, while newly created ones fail under identical configurations.

    Until there's an official fix or confirmation from Microsoft, you can work around this issue using the following approach,

    Use Build Pipelines to Stage GitHub Repos as Internal Artifacts

    Instead of adding private GitHub repositories directly in the Release pipeline, create a separate Build pipeline for each repo to publish it as an internal artifact, and then use those artifacts in the Release pipeline.

    1. Create Build Pipelines (One Per GitHub Repo)

    Each Build pipeline will clone a private GitHub repository and publish its contents as an internal Azure DevOps artifact. Please refer this Msdoc to know about Publish Build Artifacts task.

    
    trigger:
    
    - main
    
    pool:
    
      vmImage: 'ubuntu-latest'
    
    resources:
    
      repositories:
    
        - repository: self
    
          type: github
    
          endpoint: github-private-conn  # GitHub service connection
    
          name: OrgName/repoA
    
    steps:
    
    - checkout: self
    
    - task: PublishBuildArtifacts@1
    
      inputs:
    
        pathToPublish: '$(Build.SourcesDirectory)'
    
        artifactName: 'RepoA'
    
    

    Repeat for other repos too eg: repoB, repoC, etc, changing the name and artifactName.

    1. Now use These Artifacts in the Release Pipeline

    Go to Artifacts section in the release pipeline -> click +add -> Source type : Build -> Source (build pipeline): build-repoA ->Source alias : RepoA

    Repeat this for other repos also.

    Artifacts will be downloaded into,

    
     `$(System.DefaultWorkingDirectory)/RepoA/`
    
     `$(System.DefaultWorkingDirectory)/RepoB/`
    
    

    Sample release pipeline:

    
    - task: PowerShell@2
    
      inputs:
    
        targetType: 'inline'
    
        script: |
    
          Write-Host "Contents of RepoA:"
    
          Get-ChildItem "$(System.DefaultWorkingDirectory)/RepoA" -Recurse
    
          Write-Host "Contents of RepoB:"
    
          Get-ChildItem "$(System.DefaultWorkingDirectory)/RepoB" -Recurse
    
    

    This will avoid the GitHub artifact download logic in Release pipelines, which is currently failing for multiple private repos.

    And also, the Release pipeline only interacts with Azure DevOps artifacts, bypassing the GitHub client bug.

    Please click Accept Answer and kindly upvote it so that other people who faces similar issue may get benefitted from it.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.