Skip to main content
Table of Contents

Connecting GitLab to LinearB

Connect GitLab to LinearB using a Personal Access Token (PAT) to sync repositories, merge requests, and Git activity.

Steven Silverstone
Updated by Steven Silverstone

Select the required scopes (permissions).

Required scopes (permissions)

Select the following scopes when creating the Personal Access Token:

Scope Required Purpose
api Yes Allows LinearB to access repository, merge request, and group data.
write_repository Recommended Allows LinearB to configure webhooks for near real-time updates.
Without write_repository, LinearB can still collect data, but updates may be delayed by up to 2 hours because webhooks cannot be configured automatically.

All other GitLab Personal Access Token scopes are optional and are not required for a standard LinearB integration.

  1. Select Create personal access token.
  2. Save the token somewhere safe. After you leave the page, you can’t view it again.

For more details, see the GitLab Personal Access Token Documentation .


Optional: Real-time updates with write_repository

LinearB requires write_repository permissions to configure webhooks for real-time data collection. Without this permission, LinearB still works, but data updates may be delayed by up to 2 hours.

  • This delay can impact metric accuracy and increase wait times for WorkerB notifications (for example, PR review requests).

Alternative authentication method

If write_repository cannot be granted due to security restrictions, consider using a service account:

  1. Create a GitLab service account with admin permissions for all relevant repositories.
  2. If applicable, use an existing “global admins” group to manage access.
  3. Connect the service account to LinearB using OAuth.

For more details, see GitLab’s documentation on creating groups in GitLab.


Step 2. Connect GitLab to LinearB

After generating a PAT, connect it in LinearB:

  1. In LinearB, go to Settings → Company Settings and select the Git tab.
  2. Click Add Integration.
  3. Select GitLab as your Git provider.

Select GitLab integration in LinearB

  1. Paste your Personal Access Token (PAT) into the required field.
  2. Click Connect. LinearB will begin processing your GitLab repositories.

Paste GitLab PAT and connect in LinearB


Step 3. Reauthorize your GitLab token in LinearB (expired token)

If your GitLab token expires, generate a new token and update it in LinearB:

  1. Generate a new token by following Step 1 above.
  2. In LinearB, go to Company Settings and select the Git tab.
  3. Click the three-dot menu next to your existing GitLab connection.
  4. Select Reauthorize Git and enter your new token.

Once updated, LinearB resumes processing your GitLab data.

Reauthorize GitLab token in LinearB


Troubleshooting & support
  • Ensure the PAT includes the required scopes (permissions).
  • Verify your GitLab account has access to the repositories you want to connect.
  • If issues persist, contact LinearB Support or join the Dev Interrupted Discord Server.

Related guides

Need assistance?
Visit our HelpDocs Support Page.

How did we do?

Contact