While deploying my tests on a Jenkins instance, I noticed that some submodules could not be initialized.
In Jenkins, I checked the checkbox for Use credentials from default remote of parent repository
which made it possible to initialize the first submodule. Unfortunately, no matter what I do, the rest doesn't work.
> git remote # timeout=10
> git submodule init # timeout=10
> git submodule sync # timeout=10
> git config --get remote.origin.url # timeout=10
> git submodule init # timeout=10
> git config -f .gitmodules --get-regexp ^submodule\.(.+)\.url # timeout=10
> git config --get submodule.sub1.url # timeout=10
> git remote # timeout=10
> git config --get remote.origin.url # timeout=10
> git config -f .gitmodules --get submodule.sub1.path # timeout=10
using GIT_SSH to set credentials
> git submodule update --init --recursive sub1
> git config --get submodule.sub2.url # timeout=10
> git remote # timeout=10
> git config --get remote.origin.url # timeout=10
> git config -f .gitmodules --get submodule.sub2.path # timeout=10
using GIT_SSH to set credentials
> git submodule update --init --recursive sub2
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
[Bitbucket] Notifying commit build result
[Bitbucket] Build result notified
hudson.plugins.git.GitException: Command "git submodule update --init --recursive sub2" returned status code 1:
stdout:
stderr: Cloning into '/var/jenkins_home/workspace/develop/sub2'...
repository does not exist.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:xxxx/xxx.git/sub2' into submodule path '/var/jenkins_home/workspace/develop/sub2' failed
Failed to clone 'sub2'. Retry scheduled
Cloning into '/var/jenkins_home/workspace/develop/sub2'...
repository does not exist.
fatal: Could not read from remote repository.
I also checked that in .git/config
, I have the proper paths to the other repositories in bitbucket.
Delete all submodules from their physical locations and try again:
? – Maxine