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.
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. |
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.
- Select Create personal access token.
- 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:
- Create a GitLab service account with admin permissions for all relevant repositories.
- If applicable, use an existing “global admins” group to manage access.
- 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:
- In LinearB, go to Settings → Company Settings and select the Git tab.
- Click Add Integration.
- Select GitLab as your Git provider.
- Paste your Personal Access Token (PAT) into the required field.
- Click Connect. LinearB will begin processing your GitLab repositories.
Step 3. Reauthorize your GitLab token in LinearB (expired token)
If your GitLab token expires, generate a new token and update it in LinearB:
- Generate a new token by following Step 1 above.
- In LinearB, go to Company Settings and select the Git tab.
- Click the three-dot menu next to your existing GitLab connection.
- Select Reauthorize Git and enter your new token.
Once updated, LinearB resumes processing your GitLab data.
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?