Jal*_*x23 4 azure-devops azure-pipelines
我正在尝试检查管道中的不同存储库。
这些将是完整的 URL,因此两个存储库都位于同一个 Azure DevOps 中:
https://dev.azure.com/company/Services/_git/mylocal
https://dev.azure.com/company/OtherServices/_git/another
我正在尝试在位于 Services/mylocal@develop 的 YAML 中执行此操作:
steps:
- checkout: self
- checkout: git://OtherServices/another@develop
Run Code Online (Sandbox Code Playgroud)
据我了解,这应该很简单。我可以完全访问这两个存储库。尽管如此,我得到:
remote: TF401019: The Git repository with name or identifier another does not exist or you do not have permissions for the operation you are attempting.
fatal: repository 'https://dev.azure.com/company/OtherServices/_git/another' not found
Run Code Online (Sandbox Code Playgroud)
我不确定 Azure Pipelines 是否支持这一点。但如果是的话,那我做错了什么?我们的 DevOps 人员说尝试使用 PAT,但是如何在结账时使用 PAT?我还没有找到这方面的文献。
我还有什么其他选择?
谢谢!
这是解决方案:
在项目服务中:
转到项目设置 -> 管道/设置 -> 常规/“将非发布管道的作业授权范围限制到当前项目”或“将发布管道的作业授权范围限制到当前项目”。
根据管道的类型禁用其中之一。
如果 ToggleButton 为灰色,请先禁用组织范围的选项:
Go to Organization settings -> Pipelines/Settings ->Disable General/"Limit job authorization scope to current project for non-release pipelines" or "Limit job authorization scope to current project for release pipelines".
After the above work is completed, you can run your pipeline again. Make sure the project, repository and branch names in the checkout
are correct.
Update:
Thanks @Bill Jetzer in the comments! If you are using classic UI pipeline, in addition to the above setting, please go to the edit page of your pipeline. Select "Options" tab. In "Build job" -> "Build job authorization scope", please confirm you are selecting "Project collection".
归档时间: |
|
查看次数: |
4456 次 |
最近记录: |