我创建了主项目
https://dev.azure.com/GilbertHsu/pipeline_test
在主项目中将3个项目作为子模块
https://dev.azure.com/GilbertHsu/otherProjectA
https://dev.azure.com/GilbertHsu/otherProjectB
https://dev.azure.com/GilbertHsu/otherProjectC
正在使用每个项目的默认设置。在管道中,azure-pipelines.yml:
jobs:
- job: MacOS
strategy:
matrix:
mac:
imageName: 'macOS-10.14'
pool:
vmImage: $(imageName)
steps:
- template: azure-pipelines-ci/macos.yml
在azure-pipelines-ci / macos.yml中:
# macOS-specific:
# ref. https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabls=schema%2Cparameter-schema&tabs=schema%2Cparameter-schema#checkout
steps:
- checkout: self
clean: true
path: pipeline-test
submodules: true
.gitmodules:
[submodule "otherProjectA"]
path = otherProjectA
url = ../../../otherProjectA/_git/otherProjectA
[submodule "otherProjectB"]
path = otherProjectB
url = ../../../otherProjectB/_git/otherProjectB
[submodule "otherProjectC"]
path = otherProjectC
url = ../../../otherProjectC/_git/otherProjectC
当我触发管道时,它总是失败
Submodule 'otherProjectA' (https://GilbertHsu@dev.azure.com/GilbertHsu/otherProjectA/_git/otherProjectA) registered for path 'otherProjectA'
Submodule 'otherProjectB' (https://GilbertHsu@dev.azure.com/GilbertHsu/otherProjectB/_git/otherProjectB) registered for path 'otherProjectB'
Submodule 'otherProjectC' (https://GilbertHsu@dev.azure.com/GilbertHsu/otherProjectC/_git/otherProjectC) registered for path 'otherProjectC'
Cloning into '/Users/runner/work/1/VMCPS/otherProjectA'...
remote: TF401019: The Git repository with name or identifier otherProjectA does not exist or you do not have permissions for the operation you are attempting.
fatal: repository 'https://dev.azure.com/GilbertHsu/otherProjectA/_git/otherProjectA/' not found
fatal: clone of 'https://GilbertHsu@dev.azure.com/GilbertHsu/otherProjectA/_git/otherProjectA' into submodule path '/Users/runner/work/1/VMCPS/otherProjectA' failed
Failed to clone 'otherProjectA'. Retry scheduled
Cloning into '/Users/runner/work/1/VMCPS/otherProjectB'...
remote: TF401019: The Git repository with name or identifier otherProjectB does not exist or you do not have permissions for the operation you are attempting.
fatal: repository 'https://dev.azure.com/GilbertHsu/otherProjectB/_git/otherProjectB/' not found
fatal: clone of 'https://GilbertHsu@dev.azure.com/GilbertHsu/otherProjectB/_git/otherProjectB' into submodule path '/Users/runner/work/1/VMCPS/otherProjectB' failed
Failed to clone 'otherProjectB'. Retry scheduled
Cloning into '/Users/runner/work/1/VMCPS/otherProjectC'...
remote: TF401019: The Git repository with name or identifier otherProjectC does not exist or you do not have permissions for the operation you are attempting.
fatal: repository 'https://dev.azure.com/GilbertHsu/otherProjectC/_git/otherProjectC/' not found
fatal: clone of 'https://GilbertHsu@dev.azure.com/GilbertHsu/otherProjectC/_git/otherProjectC' into submodule path '/Users/runner/work/1/VMCPS/otherProjectC' failed
Failed to clone 'otherProjectC'. Retry scheduled
Cloning into '/Users/runner/work/1/VMCPS/otherProjectA'...
remote: TF401019: The Git repository with name or identifier otherProjectA does not exist or you do not have permissions for the operation you are attempting.
fatal: repository 'https://dev.azure.com/GilbertHsu/otherProjectA/_git/otherProjectA/' not found
fatal: clone of 'https://GilbertHsu@dev.azure.com/GilbertHsu/otherProjectA/_git/otherProjectA' into submodule path '/Users/runner/work/1/VMCPS/otherProjectA' failed
Failed to clone 'otherProjectA' a second time, aborting
针对此类错误消息,通过Google搜索,我已经测试了以下方法
我已经在这个问题上停留了几天,确实需要帮助。