Use this guide to prepare a private Bitbucket Cloud repository before enabling Git versioning in Leapwork Flow.
Before you begin
-
Confirm that you have access to the Bitbucket Cloud workspace.
-
Identify the Leapwork administrators and contributors who need repository access.
-
Create one repository for each Leapwork team that will use Git versioning.
-
Confirm that your Bitbucket plan supports workspace access tokens if you plan to use them. Workspace access tokens require Bitbucket Cloud Premium.
Leapwork labels its credentials Connection PAT, Repository PAT, and User PAT. For Bitbucket Cloud, use the supported access tokens rather than personal API tokens or app passwords.
Create a private repository
-
Open the Bitbucket workspace.
-
Select Create > Repository.
-
Choose the workspace as the repository owner.
-
Enter a repository name.
-
Keep This is a private repository selected.
-
Select Include a README to create an initial commit and default branch.
-
Select Create repository.
The repository must have a branch and at least one commit before migration.
Give users repository access
-
Open the repository and select Repository settings > User and group access.
-
Add the Leapwork administrators and contributors, preferably through a workspace group.
-
Give them Write access.
-
Confirm that no branch restriction prevents Leapwork from writing to the default branch.
Reserve this repository for Leapwork. Do not push manual commits, merge pull requests, rewrite history, or use it for unrelated files.
Create Bitbucket access tokens
|
Leapwork credential |
Suggested Bitbucket token |
Required permission |
|---|---|---|
|
Connection PAT |
Workspace access token |
Read access to workspace, project, and repository |
|
Repository PAT |
Repository or workspace access token |
Read and write access to the mapped repository |
|
User PAT |
Supported access token for the user |
Read and write access to the mapped repository |
-
Create the token from the workspace or repository’s access-token settings.
-
Enter a descriptive name and expiry date.
-
Select the narrowest permissions that meet the table’s requirements.
-
Create the token, then copy and store it securely.
Never include a token in a document, ticket, chat, email, or source-control file.
Provide the connection details
Give the Leapwork administrator the following through an approved secrets channel:
-
Bitbucket API URL:
https://api.bitbucket.org/2.0/ -
Connection PAT
-
Workspace and repository name
-
Repository PAT
-
Whether the team will use individual User PATs or the Repository PAT fallback