Administration

Creating Personal Access Tokens (GitHub & GitLab)

The Add Integration wizard lets you authenticate with OAuth, a personal access token (PAT), or - for GitLab - a webhook-only connection. Self-hosted GitHub Enterprise Server and self-managed GitLab always require a personal access token, since OAuth is only available for GitHub.com and GitLab.com. This page covers the scopes needed for a PAT on each provider.

GitHub Personal Access Token

  1. On GitHub, go to Settings → Developer settings → Personal access tokens → Fine-grained tokens
  2. Click Generate new token
  3. Select the repositories the token should access
  4. Under Repository permissions, grant:
PermissionLevel
ContentsRead (Read and write if developers will create branches from Jira)
MetadataRead
Pull requestsRead (Read and write if developers will create pull requests from Jira)
  1. Click Generate token and copy it - GitHub only shows it once

Classic Token (Alternative)

If using a classic personal access token, grant the repo scope for private repositories, or public_repo for public repositories only.

GitLab Personal Access Token

  1. On GitLab, go to Preferences → Access Tokens (or the project/group's Settings → Access Tokens for a project- or group-scoped token)
  2. Enter a name and expiration date
  3. Select the scope:
ScopeWhat It Allows
read_repositoryView commits, branches, merge requests, pipelines, and deployments
apiAlso required if developers will create branches or merge requests from Jira
  1. Click Create personal access token and copy it - GitLab only shows it once

Warning: GitLab personal access tokens have an expiration date. Rotate the token from Manage Integrations → (row Actions) → Settings before it expires to avoid an interruption in syncing.

Rotating a Token

If a token expires or is revoked, the repository's status will show an error. Generate a new token with the same scopes and update it from Manage Integrations → (row Actions) → Settings - the repository connection and its historical data are preserved.