https://gitlab.com/gitlab-org/gitlab-ce/issues/4194
git submodule
, see https://docs.gitlab.com/ce/ci/git_submodules.html.$CI_REPOSITORY_URL
defined by GitLab and available even inside child Docker containers. This environment variable already contains username and password, that can be used for another repository on the same server. See snippet from .gitlab-ci.yml:rm -Rf --one-file-system "thirdparty/repo"
git clone \
"${CI_REPOSITORY_URL%$CI_PROJECT_PATH.git}thirdparty/repo.git" \
"thirdparty/repo"