Azure DevOps
This page describes the steps needed to mirror a repo from Copia to Azure DevOps. This process has been tested to work for users who have Two-Factor Authentication enabled.
Last updated
This page describes the steps needed to mirror a repo from Copia to Azure DevOps. This process has been tested to work for users who have Two-Factor Authentication enabled.
Last updated
Note: These instructions are provided as a basic guideline for mirroring Copia repositories to Azure DevOps. It is up to the customer to implement the Copia repositories into their Pipelines as they desire. These instructions are only intended for one-way mirroring.
A video demonstration of this process can be found .
In Azure, create a Project or find an existing project
In Azure, go to Pipelines, then select New Pipeline
On the "Where is your code?" screen, select "Other Git"
Create a new Service Connection for the repository.
Name the connection appropriately using a naming convention that makes sense for your team. We recommend indicating which user's credentials were used to create the Service Connection as part of the naming convention.
Under "Git repository URL", copy and paste the Copia URL ()
Under "User name", enter the Copia username of a user who has access to the repository
Under "Password / Token", enter the password of the Copia user who has access to the repository or enter an Access Token that can be created at (Note: Currently, Copia only generates Access Tokens that have full access to your account)
Set the value for "Default branch for manual and scheduled builds" according to your Copia repo's default branch name
Click Okay to close out of the pop-up window.
On the "Select a template" page, scroll down to select the "Empty pipeline" option, or select a template that your company uses for pipelines
On the Pipeline page, name your Pipeline and change the "Agent Specification" to ubuntu-22.04
If you are using Git LFS in the repository (or if you plan to), click on "Get sources", and then select the option to "Checkout files from LFS". This will download files from LFS. More information for checking out files with LFS can be found .
On the "Tasks" tab and under "Pipeline", click on "Agent job" and check the box "Allow scripts to access the OAuth token" under the "Additional options" dropdown
On the "Tasks" tab and under "Pipeline" and "Agent job", click the "Add task" button and search for and select "Bash Script"
In the PowerShell window that opens, change the Type to "Inline", and then paste the code below seen at the end of the steps.
Select the "Variables" tab and enter the following variables and their corresponding values
AzureRepo
: URL to the repository in Azure ()
Note: Do Not include any text before dev.azure.com at the beginning of the URL.
AzureRepo_PAT
: Azure repository Personal Access Token. You must generate this PAT yourself and give it access to the target repository
Generate a PAT by navigating to the "Repos" section in the Azure DevOps project and then click the "Clone" button and then "Generate Git Credentials"
AzureRepo_USER
: User associated with the AzureRepo_PAT
If you want the Azure Pipeline to check Copia for changes to the repo on some sort of interval, select the "Triggers" tab, check "Enable continuous integration", and then set the polling interval
Save the pipeline
Manually Run the pipeline
If the Pipeline executed successfully, you should see a green check mark in the "Runs" tab of the Pipelines page