Gitlab runner with submodules permission error
I am using a small ci with this block to fetch my submodules
variables:
GIT_SUBMODULE_STRATEGY: recursive
I am using a private gitlab server from my university and the submodules urls are relative
[submodule "operation-log-backend"]
path = operation-log-backend
url = ../operation-log-backend.git
The error is:
Cloning into ‘/home/gitlab-runner/builds/xxx/0/xxx/Operation-log-tool/operation-log-backend’…
/home/gitlab-runner/builds/e435efa7/0/xxx/Operation-log-tool/.git/modules/operation-log-backend: Permission denied
fatal: clone of ‘https://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@xxx/operation-log-backend.git’ into submodule path ‘/home/gitlab-runner/builds/xxx/0/xxx/Operation-log-tool/operation-log-backend’ failed
If I am printing the local git config the issue is that the token for the submodules is not correct.
Any idea how I can add the correct token for each repo or how to add the same runner to the submodules ?
Thanks