Skip to main content
Garth connects to GitHub in two ways: the Garth GitHub App or a classic personal access token (this page). Use a token when you run GitHub Enterprise Server, or when organization policy prevents installing a GitHub App. If neither applies, GitHub via App needs no token rotation.
Only one GitHub connection can be active at a time. To switch methods, remove the existing connection first — uninstall the Garth App, or disconnect the token — then wait a few minutes and reload the integrations page.
The token owner must be an admin of the organization, or of every repository you want reviewed. The scopes below only grant what that account is already allowed to do. Token expiry is managed by you — Garth stops reviewing when the token lapses.

Step 1: Create a classic personal access token

Do not use a personal user account. Code reviews are attributed to the token owner. Create a dedicated service account named GPRABot for this integration and grant it admin access to the organization or target repositories.
1

Authenticate as the service account

Log into GitHub using the dedicated Garth service account.
2

Open token settings

Go to Settings → Developer settings → Personal access tokens (classic) and click Generate new token (classic).
Garth requires a classic token. Fine-grained personal access tokens are not supported.
3

Name the token and set expiry

Give the token a clear name such as Garth PR Token and choose an expiry. Record the expiry date — when the token lapses, Garth stops reviewing until you replace it in the dashboard.
4

Select token scopes

Enable the following scopes:
5

Save the token

Click Generate token and copy it immediately — GitHub displays it only once.
1

Open Garth integrations

Log into the Garth dashboard and navigate to Settings → Integrations.
2

Choose the token method

Select the GitHub tab, then choose Personal Access Token.
Garth GitHub integration settings showing the GitHub App and Personal Access Token connection options

Choose how to connect GitHub: the Garth GitHub App or a Personal Access Token

3

Enter your credentials

Provide the Organization or User URL and the Personal Access Token you just created, then click Validate.
  • Organization: https://github.com/orgs/your-org
  • Personal account: https://github.com/your-username
  • GitHub Enterprise Server: use your server host, for example https://github.example.com/orgs/your-org
The token is encrypted at rest on Garth’s servers. Your source code is never stored on Garth’s servers.
Garth GitHub integration form with Organization or User URL and Personal Access Token fields and the required token scopes

Enter your Organization or User URL and Personal Access Token, then click Validate

4

Confirm and save

Garth validates the token, shows the account it resolved, then saves the credentials and fetches your repositories.
5

Install repositories

Select the repositories you want Garth to review and click Install Repositories.
Automatic webhooks: Garth installs webhooks on selected repositories automatically. No manual webhook configuration is required. Webhooks are also removed automatically when you uninstall a repository.

Step 3: Activate and configure the repository

After installation, activate each repository under Agent Setup → PR Review → Repository Setup. Once a repository is activated, you can configure the following options:
  1. Files to Exclude — specify file patterns that Garth should skip during reviews.
  2. Source Branches to Exclude — exclude PRs originating from certain branches.
  3. Destination Branches to Exclude — exclude PRs targeting certain branches.
  4. Auto Review — enable or disable automatic reviews for new PRs on this repository.
  5. Repository PR Review Guidelines — define custom review guidelines specific to this repository.

Troubleshooting

If Validate rejects your credentials:
  1. Check the token type — Garth requires a classic personal access token. Fine-grained tokens fail validation.
  2. Check the scopes — confirm repo, read:org, user:email, and admin:repo_hook are all selected. Scopes cannot be added to an existing classic token; regenerate it if one is missing.
  3. Check the URL format — use https://github.com/orgs/your-org for an organization or https://github.com/your-username for a personal account.
  4. Check SSO enforcement — if your organization uses SAML SSO, authorize the token for SSO from Settings → Developer settings → Personal access tokens (classic) in GitHub.
  5. Confirm no existing connection is blocking — only one GitHub connection can be active at a time. Uninstall the Garth GitHub App first if it is still installed.
If Garth is not reviewing pull requests on an installed repository:
  1. Check webhook status — in the repository’s Settings → Webhooks, verify the Garth webhook exists and recent deliveries succeeded.
  2. Verify admin access — the token owner needs admin access on the repository for admin:repo_hook to create webhooks.
  3. Delete a stale webhook manually, then untoggle and re-toggle the repository in the Garth dashboard to reinstall it.
If Garth is installed but you are not receiving reviews:
  1. Check repository activation — go to Agent Setup → PR Review → Repository Setup and confirm the repository is activated.
  2. Verify Auto Review is enabled — ensure the Auto Review toggle is turned on for the repository.
  3. Check branch exclusions — confirm the source or destination branch of your PR is not listed under Source Branches to Exclude or Destination Branches to Exclude.
  4. Check file exclusions — verify that the files changed in your PR are not covered by patterns in Files to Exclude.
Classic tokens expire on the date you set. When a token lapses or you rotate the service account:
  1. Generate a replacement token with the same scopes.
  2. Update it in Garth — go to Settings → Integrations → GitHub and re-enter the credentials, then click Validate.
  3. Re-check repository tracking — confirm your repositories are still installed and activated.
Only one GitHub connection can be active at a time. To move from a token to the App:
  1. Disconnect the token — in Garth, go to Settings → Integrations → GitHub and remove the existing connection.
  2. Wait a few minutes and reload the integrations page.
  3. Install the App — follow GitHub via App.