IBM Cloud Docs
Configuring cloning of Git submodules

Configuring cloning of Git submodules

The process of create a copy of your Git repository (repo) in your local computer is called a Git cloning. The copy that is created in your local computer is called as Git Clone.

By default, the Git clones in the pipelines do not clone the submodules in a repository. However, you can enable cloning the submodules in the user repositories (application repo and one-pipeline configuration repo) by setting either one of the opt-in flags.

Currently, Git clone in pipelines uses HTTPS, SSH is not supported. To clone the submodules, the .gitmodules file in the Git repository must use either HTTPS URLs or relative URLs.

The opt-in flags are as follows:

  • opt-in-clone-submodules
  • opt-in-clone-remote-submodules

Opt-in parameters

Optional parameters for cloning git submodules
Parameter name Description
opt-in-clone-submodules Set to 1 to enable cloning of the submodules. Clones with the --recurse-submodules Git option
opt-in-clone-remote-submodules Set to 1 to enable cloning of the submodules by using the status of the submodule's remote tracking branching. Clones with --recurse-submodules --remote-submodules Git options.