Unity Cloud Build supports projects stored in Git repositories. Your repository can be hosted on GitHub, GitLab, Bitbucket, or private servers.
Note: This feature requires a subscription to Unity Teams Advanced. For more information, see the Unity Teams page.
This topic covers:
To configure Cloud Build to build your Project from a GitHub repository:
You can configure access to your repository using the following authorization protocols:
To configure Cloud Build to use OAuth to access your repository:
Note: If you are currently signed into the source code management service, Cloud Build uses your current credentials to retrieve the repository list. To configure a Project that retrieves a repository from a different account, sign out of the source code management service first, then configure the Project.
For the next step, see the Setting up a target build platform section.
To configure Cloud Build to use SSH to access your repository:
In the Source Control window, click the Manual tab.
In the SCM URL field, enter the URL of your Git server in either of the following formats:
To connect to your repository, you must specify the URL to your Git server. For information on the format of the URL, see the URL syntax section below.
From the SCM Type drop-down menu, select GIT.
Click the NEXT: ACCESS button.
When Unity Cloud Build connects to the hosting site, it automatically detects whether your repository is public or private. If your repository is public, Cloud Build automatically connects to it and you can skip to Setting up a target build platform. If your repository is private, see the Using private repositoriessection.
When Unity Cloud Build connects to the hosting site, it automatically detects whether your repository is public or private. If your repository is public, Cloud Build automatically connects to it and you can skip to Setting up a target build platform.
To connect to your repository, you must specify the URL to your Git server. You can specify the URL to use the following protocols:
The following are examples of URLs for GitHub, bitbucket, and GitLab:
Note: If you are hosting Git on a private server, you must use SSH to connect to your repository.
Use the format that is most convenient for you.; Unity Cloud Build automatically re-writes the URL into the format it needs.
If your repository is private, Cloud Build must use SSH to connect to it. When Cloud Build detects that the repository is private, it displays the Grant us access to your source control screen.
To add your SSH key to your project in GitHub
Sign in to GitHub.
In the upper-right corner of any GitHub page, click your profile photo, then click Your profile.
On your profile page, click Repositories, then click the name of your repository.
In your repository, click the Settings tab.
In the sidebar, click Deploy Keys, then click the Add deploy key button.
In the Title textbox, type name to identify this key.
In the KeyCan refer to an Input Key or an Animation Key
See in Glossary field, paste in your public key from the Grant us access to your source control window, and then click the Add key button.
For more information on deploy keys, see Managing Deploy Keys in the GitHub documentation.
You can also add your SSH key to your GitHub account so that all repositories in your account are accessible to Cloud Build. For more information, see Adding a new SSH key to your GitHub account in the GitHub documentation.
To add your SSH key to your Bitbucket account:
Log in to Bitbucket.
Click your avatarAn interface for retargeting animation from one rig to another. More info
See in Glossary in the lower left of the page.
Click Bitbucket Settings.
On the Settings page, in the SECURITY section, click SSH Keys.
In SSH Keys, click the Add key button.
In the Label field, enter a recognizable name for the key (such as Unity Cloud BuildSee Cloud Build More info
See in Glossary.)
Paste the Unity Cloud Build SSH key from the Grant us access to your source control window into the Key field.
Click Add Key.
On the Grant us access to your source control window, click Next: Target Setup.
In the dashboard, on the NEW BUILD TARGET: BASIC INFO window:
In the Target Label field, enter a name for the build.
If the root folder of your repository doesn’t contain your AssetsAny media or data that can be used in your game or Project. An asset may come from a file created outside of Unity, such as a 3D model, an audio file or an image. You can also create some asset types in Unity, such as an Animator Controller, an Audio Mixer or a Render Texture. More info
See in Glossary and Project settingsA broad collection of settings which allow you to configure how Physics, Audio, Networking, Graphics, Input and many other areas of your Project behave. More info
See in Glossary, in the Project Subfolder field, enter the URL of the folder that contains your Assets and Project settings.
From the Unity Version drop-down menu, select the version of Unity with which to build the Project.
If you do not want the Project to automatically build whenever your repository is updated, click the Auto-build toggle to disable this feature.
If you are building for the iOSApple’s mobile operating system. More info
See in Glossary or Android platforms, your next step is to enter credentials for the build. Click Next: Credentials. For all other platforms, click Next: Build to complete the configuration and start the initial build.
In the IOS SIGNING CREDS window supply the following information:
A Bundle ID to uniquely identify your app on the device and in Google Play Store.
Enter your Android keystoreAn Android system that lets you store cryptographic key entries for enhanced device security. More info
See in Glossary credentials or select Auto Generated Debug Keystore to use a development keystore. For more information on Android keystores, see Android Keystore System.
In the IOS SIGNING CREDS window supply the following information:
A Bundle ID to uniquely identify your app on the device.
The Xcode version with which to build the app.
Enter your IOS credentials. For more information on iOS credentials, see Building for iOS.
If your project is using private Git submodules, make sure that the URLs present in your .gitmodules file are using the git@
syntax instead of https://
or git://
.
For example:
git@github.com:youraccount/yourrepo.git (for GitHub)
git@bitbucket.org:youraccount/yourrepo.git (for Bitbucket)
git@gitlab.com:youracccount/yourrepo.git (for GitLab)
2018–07–16Page amended with editorial review