Use this guide to prepare an Azure Repos Git repository before enabling Git versioning in Leapwork Flow.
Before you begin
-
Confirm that you have access to the Azure DevOps organization and project.
-
Make sure Azure Repos is enabled for the project.
-
Identify the Leapwork administrators and contributors who need repository access.
-
Create one repository for each Leapwork team that will use Git versioning.
Create and initialize a repository
-
Open the Azure DevOps project.
-
Select Repos > Files.
-
Open the repository selector and choose New repository.
-
Enter a repository name and create the repository.
-
Initialize it with a first commit, such as a README.
The repository must have a branch and at least one commit before migration. An empty repository cannot be used for migration.
Give users repository access
-
Open Project settings > Permissions.
-
Add the required users or Microsoft Entra ID group.
-
Add Leapwork administrators and contributors to Contributors, or an equivalent group.
-
Confirm they have Basic access.
-
Open Project settings > Repositories and select the Leapwork repository.
-
Under Security, confirm that the required identities have Read and Contribute permissions.
Avoid branch policies that prevent Leapwork from writing to the default branch.
Create Azure DevOps personal access tokens
|
Token |
Scope |
Repository access |
Purpose |
|---|---|---|---|
|
Connection PAT |
Code: Read |
Read access to repositories that should appear in Leapwork |
Lists and validates repositories. |
|
Repository PAT |
Code: Read & write |
Read and Contribute on the mapped repository |
Migration and shared fallback uploads when Override User PAT is enabled. |
|
User PAT |
Code: Read & write |
Read and Contribute on the mapped repository |
Uploads versions saved by that user. |
-
Open User settings > Personal access tokens.
-
Select New Token.
-
Enter a descriptive name.
-
Select the Azure DevOps organization and an expiry date.
-
Select the scope from the table above.
-
Create the token, then copy it and store it securely.
A PAT scope alone does not grant access to the repository. The token owner also needs the required project and repository permissions.
Provide the connection details
Give the Leapwork administrator the following through an approved secrets channel:
-
Azure DevOps API URL:
https://dev.azure.com/{organization} -
Connection PAT
-
Project and repository name
-
Repository PAT
-
Whether the team will use individual User PATs or the Repository PAT fallback