git submodule update stuck while running CI build
Problem
While running CI build through gitlab-ci.yml the build gets stuck with the following line
Updating/initializing submodules recursively .....
This issue comes after running a couple of builds and a runner restart is needed . I m using the following lines in my gitlab-ci.yml
before_script:
- git submodule sync --recursive
- git submodule update --init --recursive --remote
Workaround
This problem is likely due to the git credential manager on Windows asking for interactive input. The following job variables can prevent this:
variables:
GIT_TERMINAL_PROMPT: "0"
GCM_INTERACTIVE: "Never"
Following the steps in https://docs.gitlab.com/ee/ci/git_submodules.html might help resolve as to why submodules need credentials, but there's not a one-fits-all solution to this.
Edited by Arran Walker