Problems with git submodules in Gitlab CI

Posted . Visible to the public.

If you are using git submodules in Gitlab CI, you might run into a "The project you were looking for could not be found or you don't have permission to view it."

Gitlab added a feature that new projects are no longer allowed to be cloned inside CI runs of other repositories by default. To fix this

  • Go into the project used as a submodule
  • Go to "Settings" -> "CI/CD" (if you don't see this section, enable it in "Settings" -> "General" -> "Visibility, project features, permissions")
  • Go to "Token Access"
  • Either disable "Limit access to this project" or add the project using the submodule to the allowlist
Tobias Kraze
Last edit
Emanuel
License
Source code in this card is licensed under the MIT License.
Posted by Tobias Kraze to makandra dev (2024-04-10 16:18)