Set up Bitbucket Cloud for Git versioning

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

  1. Open the Bitbucket workspace.

  2. Select Create > Repository.

  3. Choose the workspace as the repository owner.

  4. Enter a repository name.

  5. Keep This is a private repository selected.

  6. Select Include a README to create an initial commit and default branch.

  7. Select Create repository.

The repository must have a branch and at least one commit before migration.

Give users repository access

  1. Open the repository and select Repository settings > User and group access.

  2. Add the Leapwork administrators and contributors, preferably through a workspace group.

  3. Give them Write access.

  4. 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

  1. Create the token from the workspace or repository’s access-token settings.

  2. Enter a descriptive name and expiry date.

  3. Select the narrowest permissions that meet the table’s requirements.

  4. 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