This article is about CodeShip Basic.

Git Submodules

You will need about one minute to read this article.

If your repository includes a .gitmodules file, CodeShip will automatically initialize and update the configured submodules. The following command is run after cloning your repository to do this.

git submodule update --recursive --init

Right now there is not a way to skip this command, but let us know if that creates a problem for your build.

Submodule Permissions

Submodules that are hosted as public repositories should just work, but let us know if you see any issues.

If your submodule is a private repository you need to make sure CodeShip can clone the repository.

  1. Make sure the project’s 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 reference 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.

Typical Error Messages

See how to provide access to other repositories if you see an error like these.

remote: Repository not found
fatal: Could not read from remote repository
Permission denied (publickey).
Please make sure you have the correct access rights
and the repository exists.
Clone of '' into submodule path 'path' failed

Need more help?

Contact our support team or post on Stack Overflow using the tag #codeship. Did you check the status page and changelog?

There are also several code examples and sample projects available for you to get started with.

Article not helpful?

Does this article need improvement? If so, please send feedback or submit a pull request!