Found that private submodules need to be defined relative to the main repo (and therefore, need to be hosted on the same service). See here: https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/pipeline-options-for-git?view=azure-devops&tabs=yaml#checkout-submodules
How do I authorize Azure to checkout git submodules in the repo?
I am attempting to checkout a repo in an Azure pipeline that has a git submodule in it.
I added the submodules: true flag:
But when it attempts to checkout it out, it thinks it does not have access:
The submodule repo is in the same project and provider (Bitbucket) as the normal repo, and it should have the same access rights as the first repo it checks out successfully.
I have gotten it to checkout the submodule repo as if it was a main repo by adding it two the resources with my Bitbucket credentials and it pulls it just fine:
But it still fails on the checkout when it is a submodule. How do I give permissions to the submodule?
2 answers
Sort by: Most helpful
-
-
Vallan Sherrod 0 Reputation points
2024-02-01T16:09:31.1133333+00:00 Found that private submodules need to be defined relative to the main repo for Azure to pull them with the same credentials. This was my problem and it worked once I defined it as a relative URL instead of an absolute one. See: https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/pipeline-options-for-git?view=azure-devops&tabs=yaml#checkout-submodules