Cannot checkout git submodules in Azure Pipeline (Within same project)?

Viewed 39

I have added a git submodule into the main project, which references the sub-project using a relative path. The .gitmodules looks like this:

[submodule "Shared"]
path = Shared
url = ../Shared

The Azure pipeline is configured to self checkout including the submodules: File azure-pipelines.yaml

enter image description here

The build-pipeline fails on the checkout step, and gives the following error: Error

Extra information:

  • Both repositories exist in the same organization and project.
  • Both repositories are private.
  • I have already checked if disabling the 'Limit job authorizaiton scope' in the organization- and projectsettings worked but unfortunately not.

Any ideas?

Edit: I hid the URLs in the error screenshot, however when I click those I do get a result of the repositories so it definitely exists.

1 Answers

Managed to find the solution by myself rather quickly after posting this question :).

In the project settings you should disable the YAML pipeline security toggle in order for it to checkout repos within the same project:

enter image description here

Related