To clone a submodule from another project, you can refer to the steps below.
In your new_proj, turn off Limit job authorization scope to current project for non-release pipelines and Protect access to repositories in YAML pipelines option from Project Settings -> Pipelines -> Settings.
In your pipeline, set submodules
to true
in your checkout task.
steps:
- checkout: self
submodules: true
- script: |
tree
displayName: 'ListAllFiles'
In your base_repo project, add build service account Project Collection Build Service (yourOrgName) into the Contributors group. (If you still have the same error in the pipeline, add project-level build service account new_proj Build Service (yourOrgName) into the Contributors group as well.)
Result: