In our Git project, we have the following defined in .gitmodules
[submodule "DBPkg"]
path = DBPkg
url = https://[email protected]/MainCo/OurProject/_git/DBPkg
When building the Azure Pipeline, in my "Get Sources" pipeline step (I'm using "Azure Repos Git"), I have enabled checking out of submodules
In our project settings, I have also made the following configurations ...
However, when building the project, it dies when attempting to checkout the submodule wiht the following ...
2020-10-16T20:29:44.9912145Z HEAD is now at e06abce Modified docker file to remove unnecessary container name.
2020-10-16T20:29:44.9913415Z ##[command]git submodule sync
2020-10-16T20:29:44.9920288Z ##[command]git -c http.https://[email protected]="AUTHORIZATION: bearer ***" submodule update --init --force
2020-10-16T20:29:44.9923206Z Submodule 'DBPkg' (https://[email protected]/MainCo/OurProject/_git/DBPkg) registered for path 'DBPkg'
2020-10-16T20:29:44.9923842Z Cloning into '/home/vsts/work/1/s/DBPkg'...
2020-10-16T20:29:44.9924246Z remote: TF401019: The Git repository with name or identifier DBPkg does not exist or you do not have permissions for the operation you are attempting.
2020-10-16T20:29:44.9924850Z fatal: repository 'https://dev.azure.com/MainCo/OurProject/_git/DBPkg/' not found
2020-10-16T20:29:44.9925716Z fatal: clone of 'https://[email protected]/MainCo/OurProject/_git/DBPkg' into submodule path '/home/vsts/work/1/s/DBPkg' failed
2020-10-16T20:29:44.9926288Z Failed to clone 'DBPkg'. Retry scheduled
2020-10-16T20:29:44.9926718Z Cloning into '/home/vsts/work/1/s/DBPkg'...
2020-10-16T20:29:44.9927132Z remote: TF401019: The Git repository with name or identifier DBPkg does not exist or you do not have permissions for the operation you are attempting.
2020-10-16T20:29:44.9928020Z fatal: repository 'https://dev.azure.com/MainCo/OurProject/_git/DBPkg/' not found
2020-10-16T20:29:44.9928801Z fatal: clone of 'https://[email protected]/MainCo/OurProject/_git/DBPkg' into submodule path '/home/vsts/work/1/s/DBPkg' failed
2020-10-16T20:29:44.9929412Z Failed to clone 'DBPkg' a second time, aborting
What else do I need to do to give permissions to the pipeline step to checkout the submodule? The URL in the .gitmodules is directly cut and pasted from the Repos section where we would normally clone that repository.
Edit: The URLs for the repos in questions as copied from the portals are
https://[email protected]/MainCo/OurProject/_git/MainAPIs
https://[email protected]/MainCo/OurProject/_git/DBPkg
So the submodule lives at https://[email protected]/MainCo/OurProject/_git/DBPkg but not sure how to phrase the above in terms of a Git submodules.
Edit 2:
In response to the answer given, here is the error output reported by the agent ...
...
2020-10-20T13:21:23.9543308Z ##[command]git submodule sync
2020-10-20T13:21:23.9892501Z ##[command]git -c http.https://[email protected]="AUTHORIZATION: bearer ***" submodule update --init --force
2020-10-20T13:21:24.0147532Z Submodule 'DBPkg' (https://[email protected]/MainCo/OurProject/_git/DBPkg) registered for path 'DBPkg'
2020-10-20T13:21:24.0194148Z Cloning into '/home/vsts/work/1/s/DBPkg'...
2020-10-20T13:21:24.1694357Z remote: TF401019: The Git repository with name or identifier DBPkg does not exist or you do not have permissions for the operation you are attempting.
2020-10-20T13:21:24.1696067Z fatal: repository 'https://dev.azure.com/MainCo/OurProject/_git/DBPkg/' not found
2020-10-20T13:21:24.1726598Z fatal: clone of 'https://[email protected]/MainCo/OurProject/_git/DBPkg' into submodule path '/home/vsts/work/1/s/DBPkg' failed
2020-10-20T13:21:24.1731117Z Failed to clone 'DBPkg'. Retry scheduled
2020-10-20T13:21:24.1760958Z Cloning into '/home/vsts/work/1/s/DBPkg'...
2020-10-20T13:21:24.3885945Z remote: TF401019: The Git repository with name or identifier DBPkg does not exist or you do not have permissions for the operation you are attempting.
2020-10-20T13:21:24.3892068Z fatal: repository 'https://dev.azure.com/MainCo/OurProject/_git/DBPkg/' not found
2020-10-20T13:21:24.3902720Z fatal: clone of 'https://[email protected]/MainCo/OurProject/_git/DBPkg' into submodule path '/home/vsts/work/1/s/DBPkg' failed
2020-10-20T13:21:24.3909036Z Failed to clone 'DBPkg' a second time, aborting
2020-10-20T13:21:24.3987155Z ##[error]Git submodule update failed with exit code:
1