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.
- 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
.
- 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.