在Azure DevOps经典管道中访问多存储库



我们使用的是Classic Azure DevOps Pipeline(由于组织限制)。通常我们可以在yaml设置期间使用多个rest,但同样不适用于经典。我想在我的经典管道中使用相同项目的其他repo。

我得到了这个文档从微软访问额外的回购微软文档。我遵循了同样的步骤。-c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)"任务并启用了oauthOauth

Starting: Bash Script
==============================================================================
Task         : Bash
Description  : Run a Bash script on macOS, Linux, or Windows
Version      : 3.214.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/bash
==============================================================================
Generating script.
Script contents:
git clone -c http.extraheader="AUTHORIZATION: bearer ***" "https://Project@dev.azure.com/Project/DevOps%20Integration%20Demo/_git/DevOps%20Integration%20Demo"
"C:Program FilesGitbinbash.exe" -c pwd
/d/a/_temp
========================== Starting Command Output ===========================
"C:Program FilesGitbinbash.exe" /d/a/_temp/d0ad30a0-9750-4561-9854-3bb4d4da9743.sh
Cloning into 'DevOps%20Integration%20Demo'...
remote: TF401019: The Git repository with name or identifier DevOps Integration Demo does not exist or you do not have permissions for the operation you are attempting.
fatal: repository 'https://dev.azure.com/Project/DevOps%20Integration%20Demo/_git/DevOps%20Integration%20Demo/' not found
##[error]Bash exited with code '128'.
Finishing: Bash Script

在运行管道时得到错误。这个项目是可访问的,我是该项目的项目管理员。如何解决这个问题

我使用

修复了这个问题

git克隆https://:$env:SYSTEM_ACCESSTOKEN@dev.azure.com/MyOrg/MyProj/_git/MyRepoYou

需要禁用保护访问YAML管道中的存储库设置在项目管道中克隆在经典管道

设置

最新更新