Adding apps from other repositories
How to add an app to Codemagic from any private or public repository
Apps that cannot be added via a repository integration can be cloned from a URL. Authentication for private repositories can be set up via HTTPS or SSH.
Connecting repository via SSH
Click Add application in the top right corner of the Applications page.
If you are an admin of a team in Codemagic, you’ll be asked to Select a team. You can only add the application to a team that has billing enabled. If you don’t own any teams, this step is skipped and the application will be added to your personal account.
Select Other and click Next: Select repository.
Enter the Repository URL for cloning the repository. You can find the URL from your repository by clicking Clone / Clone or download. Usually, the URL is in this format:
git@example.com:username/repo.git
.Upload the SSH private key file. If your key is password-protected, enter the Private key passphrase.
Alternatively, you can click Generate key pair and have Codemagic create an SSH key pair for you, read more about it below.
Finish setting up the application by selecting the project type and clicking Finish: Add application. You will be then redirected to the app settings.
See the getting started guides and sample projects configured with codemagic.yaml to set up your project. Alternatively, Flutter apps can be also configured using the Flutter workflow editor.
Generating a key pair in Codemagic
On clicking Generate key pair, Codemagic creates a secure 4096 bit SSH key pair. The private key will be used in Codemagic and the public key must be added to your repository settings. Click Copy to clipboard to copy the public key.
- If your repository is hosted on GitHub, GitLab or Bitbucket, add the public key to your repository’s access/deployment keys.
- For self-hosted repositories, request your git server admins to allow access to the provided public key.
After you have added the public key to your repository settings, finish adding the app by clicking Finish: Add application.
Connecting repository via HTTP/HTTPS
- Click Add application in the top right corner of the Applications page.
- Select Other and click Next: Select repository.
- Enter the Repository URL for cloning the repository. You can find the URL from your repository by clicking Clone / Clone or download. Usually, the URL is in this format:
https://example.com/path/to/repository.git
. - If the repository is private, then enter your Username and Password, or Username and Personal access token if it’s a GitHub repository. In the case of a public repository, select Public repository.
- Finish setting up the application by selecting the project type and clicking Finish: Add application. You will be then redirected to the app settings.
See the getting started guides and sample projects configured with codemagic.yaml to set up your project. Alternatively, Flutter apps can be also configured using the Flutter workflow editor.