You will need roughly 2 minutes to read this article.
Some projects have dependencies that require access to other private repositories during the build. There are several options for configuring your project to be able to access other private repositories.
CodeShip creates a SSH key pair for each project when you first configure it. This SSH key allows CodeShip to clone that main private repository by default. It will also allow CodeShip to clone other public repositories on the same SCM. For example if your private repository is on GitHub, CodeShip can clone your private repository and any public repository on GitHub during your build.
On CodeShip you can view the SSH public key under Project Settings > General. This key is automatically added as a deploy key to the repository on your SCM. For example on GitHub you can see this deploy key by going to your repository and navigating to Settings > Deploy keys.
If your project needs to access other private repositories during the build (e.g., git submodules) you will encounter a cloning error and will need to do additional configuration to enable access.
The recommended solution for accessing other private repositories is to configure a machine user on your SCM.
Even though the above example references GitHub, the process should be similar for Bitbucket and GitLab.
As an alternative you can also apply the same process above to a personal GitHub user account instead of a machine user. Keep in mind this will allow the CodeShip project to access any repository that the personal account has access to. Also note that if the personal account has permissions revoked on the SCM (for example if an employee leaves the company) then all of the CodeShip projects using that account’s authorization will also break.
If your project needs to access another private repository and has not been configured yet, you may see clone errors 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 'email@example.com:username/reponame.git' into submodule path 'path' failed
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.