I have a repository repoB on a private server serverB, and get a deploy token (user + password) from it.
This repository is used as a submodule in the project I'm trying to configure.
In this project, I want to be able to init this submodule during the Gitlab-CI.
My .gitmodules
is:
[submodule "repoB"]
path = repoB
url = https://serverB/groupB/repoB.git
And I have in my .gitlab-ci.yml
:
test_build:
variables:
GIT_SUBMODULE_STRATEGY: recursive
Actually, the error I get is the following (group: japan7
, project: nanachan
, repoB: karaneko
, serverB: git.inpt.fr
)
I suppose that I should put the deploy token user and password in the project secrets (in Settings −> CI / CD −> Variables) but I could not find the name of these variables, nor any help to solve this particular case.
How should I proceed?
Thank you in advance for your help!
I solved same issue using deploy token. Just added submodule with deploy token and everything on CI runs ok.
http://<username>:<deploy_token>@gitlab.example.com/tanuki/awesome_project.git
And .gitmodules
looks like:
[submodule "tanuki/awesome_project"]
path = tanuki/awesome_project
url = https://<username>:<deploy_token>@gitlab.example.com/tanuki/awesome_project.git
https://docs.gitlab.com/ee/user/project/deploy_tokens/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With