Adding a repository: Azure DevOps

I have been struggling a little to add my repository, so allow me to share:

First, you will have to import your SSH key into Azure DevOps:

For that, you first to Cloud Build > Config and then click on the (red) Show SSH Key button.

In a second tab or window, you open your Azure DevOps page. On the top right, you should see your account picture. Beside that, you will find a menu button for Account Settings. Click it and navigate to SSH Public Keys.

Here, you can insert the SSH Key that you just received in the previous step. To keep things tidy, it makes sense to name the SSH Key “Unity Cloud Build” or similar.

Secondly, you will have to add the repository:

Unfortunately, Unity has - at the time of me writing this - no integration for Azure DevOps yet. You can however add it manually. Click Edit Source Control and then choose Manual. To receive the URL required for this step, you have to switch back to Azure DevOps.

In Azure DevOps - assuming you are still at the settings page - click on the banner and navigate to your project. Then, click on Repos. On this page, you will see the buttons Set Up Build and Clone on the right side. Click on Clone. A panel will open and initially display the GIT setup that you would require for cloning your repository with any GIT program like e.g. Git Kraken. Click the SSH button to display the SSH URI. A click on the symbol on the right will copy the whole URI.

Now, switch back to your Unity Dashboard. Enter the SSH URI where it asks you for the SCM URL and select GIT as SCM type. Once you click Next: Access, Unity will connect to your repository.

A short while later, you should be presented with the option to set up the cloud build target. For this, you can best read Unity Cloud Build - Unity Learn, starting at chapter 4, section 4: “Configure your Unity Cloud Build project”.

(Apologies, I was not allowed to add the tag “Azure DevOps” to my thread.)

1 Like

Do you use lfs?
I’m afraid ssh with lfs is not supported by Azure DevOps

I’m also struggling to get lfs to work with this setup. The most promising lead I’ve found so far is this: Developer Community but it seems to be a local only solution and not something that I can get Unity Cloud Build to use.