Use this guide to prepare GitHub before enabling Git versioning in Leapwork Flow. An organization-owned private repository is recommended when multiple people will use the feature.
Before you begin
-
Confirm that you have access to the GitHub organization that will own the repository.
-
Identify the Leapwork administrators and contributors who need repository access.
-
Create one repository for each Leapwork team that will use Git versioning.
Create a private repository
-
Open the GitHub organization.
-
Select Repositories > New repository.
-
Select the organization as the owner.
-
Enter a repository name.
-
Set the repository visibility to Private.
-
Select Create repository.
You can initialize the repository with a README. Do not add rules that prevent Leapwork from writing version files unless Engineering has confirmed they are compatible.
Give users repository access
-
Open the repository and select Settings.
-
Open Collaborators and teams or Manage access.
-
Add the required GitHub team or users.
-
Give identities that upload version data Write access.
GitHub’s Write repository role is normally sufficient for pushing version data. Organization-owner access is not required just to upload versions.
Create a fine-grained personal access token
Create a token for each credential used by Leapwork:
|
Token |
Repository access |
Permission |
|---|---|---|
|
Connection PAT |
Repositories the administrator needs to list in Leapwork |
Metadata: Read-only |
|
Repository PAT |
The mapped repository |
Contents: Read and write |
|
User PAT |
The mapped repository |
Contents: Read and write |
-
In GitHub, open Settings > Developer settings > Personal access tokens > Fine-grained tokens.
-
Select Generate new token.
-
Enter a descriptive name and expiration date.
-
Select the GitHub organization or user that owns the repository.
-
Under Repository access, select Only select repositories, then choose the mapped repository.
-
Set permissions according to the table above.
-
Select Generate token.
-
Copy the token and store it in your approved secret-management system.
GitHub shows the token only once. Never include it in a document, ticket, chat, email, or source-control file.
If your organization requires approval for fine-grained tokens, ask an organization owner to review and approve the request.
Provide the connection details
Give the Leapwork administrator the following through an approved secrets channel:
-
GitHub API URL:
https://api.github.com/ -
Connection PAT
-
Repository owner and repository name
-
Repository PAT
-
Whether the team will use individual User PATs or the Repository PAT fallback