Can I add projects with submodules or with private repo dependencies?

Japanese translation unavailable

This page has not been translated into Japanese yet - we apologise for the inconvenience! If you’re interested in helping us out, feel free to translate any article in the jp folder of the DevCenter repository and open a PR!

このページは日本語への翻訳がまだ完了しておりません。ご不便をおかけして申し訳ございません! もしお手伝いできる方がいらっしゃれば、ご自由にjpフォルダの記事を日本語に訳していただき、PRを開いてください

If you have a project with one or more submodules or other private repository dependencies (for example, CocoaPods repositories), you have to grant access to all repositories for a successful build.

There are two ways to achieve this:

Use a machine user with read only access

It is not required to use a special “bot” / “machine” user: you can add the SSH key to your own account on the git hosting service. The best practice, however, is to use a machine user, with read only access, for those repositories you want to access during the build.

GitHub itself recommends this method for accessing multiple repositories.

On GitLab and Bitbucket it’s possible to register a single SSH key as a “Deployment key” to multiple repositories, without the need to create a “bot” / “machine” user.

Git cloning submodules and repository dependencies

There is one important detail to keep in mind when you want to give access to all submodules or private repository dependencies for an app: the app’s privacy settings determine what git URL should you use.

Creating SSH keys for a new private app

There are three options to grant Bitrise access to your repository:

Managing SSH keys of an existing private app

You can find the public SSH key of the app in the Settings of the given app on Bitrise. Scroll down to the SSH settings section and click Show SSH Public Key.

Copy the key to the given user and you are ready to build!

If necessary, update the given app’s SSH key by clicking the Change SSH Keypair button and choosing one of the three options.