我收到以下错误:
remote: TF401019: The Git repository with name or identifier Repo456 does not exist or you do not have permissions for the operation you are attempting.
在本地,没问题,一切正常。
到目前为止我所做的:
ProjectA Build Service
添加到 ProjectB的
Contributors
和/或
Readers
Agent Pool Service
添加到项目B的
Contributors
和/或
Readers
Default agent pool
> YAML
> Pipeline
步骤设置为 ProjectA 使用的代理池服务我检查了管道的 Build pipeline
YAML
> Get source
选项
我的仓库:
Checkout submodules
还尝试过:
[submodule "plugins/MyModule"]
path = plugins/MyModule
url = https://[email protected]/Org/ProjectB/_git/Repo456
这些步骤取自:签出来自不同 Azure DEvOps 组织的子模块 TF401019:名称或标识符为 public 的 Git 存储库不存在,或者您无权执行正在尝试的操作
[submodule "plugins/MyModule"]
path = plugins/MyModule
url = ../../ProjectA/Repo456
到我的
checkout
及其子模块Repo123
时,我可以重现相同的错误,如下所示。.gitmodules
ProjectA
要解决此问题,我们不仅需要关闭
Repo456
中的选项到 ProjectB
,还需要关闭
[submodule "SubmoduleRepos/Repo456"]
path = SubmoduleRepos/Repo456
url = https://[email protected]/MyOrg/ProjectB/_git/Repo456
。
另请检查ProjectA
的设置中对管道构建服务帐户Limit job authorization scope to current project for non-release pipelines
和
Protect access to repositories in YAML pipelines
授予
Read
代码的权限。