You'll 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 private repositories during the build you will get 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
We also have a couple of code examples and sample projects available.