This article is about Codeship Basic.

Using Git Submodules In CI/CD with Codeship Basic

Estimated Reading Time: 1 min

If your repository includes a .gitmodules file Codeship will automatically initialize and update the configured submodules. To do this, we run the following command after cloning your repository.

git submodule update --recursive --init

For submodules that are hosted as public repositories that should just work (and let us know if it doesn’t).

If your submodule is however a private repository you’d need to make sure Codeship can clone the repository.

  1. Make sure the projects public SSH key (from the General settings page) has access to the submodule repository. See how to provide access to other repositories if you’re not sure how to achieve this.
  2. Make sure the submodule is referenced via a SSH based URL (e.g. If you refence the submodule via a HTTPS based URL (e.g., the git client will ask for authentication credentials during the build and run into a timeout (as you can’t provide them).

See the git documentation on Git Submodules for more information on working with submodules.

Need More Help?

Get in touch if you need more help, or post on Stack Overflow using the tag #Codeship.

  • Ask The Helpdesk A Question
  • Code Examples And Sample Projects
    • Was This Article Helpful?