Table of Contents
Connecting GitHub Cloud to LinearB
Connect your GitHub Cloud organization to LinearB to sync repositories, pull requests, and Git activity.
This guide explains how to connect GitHub to LinearB. You can connect using OAuth (recommended) or a Personal Access Token (PAT).
OAuth is the preferred method for most users. A PAT may be required if you do not have admin permissions in your GitHub organization.
LinearB supports private, public, and internal GitHub repositories. You can choose which repositories to sync during setup.
Summary
What this guide covers
- Connecting GitHub using OAuth (recommended)
- Connecting GitHub using a Personal Access Token (PAT)
- Required permissions for Classic and Fine-Grained PATs
- Webhook alternatives when permissions are restricted
- Reauthorizing an expired GitHub token
Before you begin
- LinearB Admin role
- GitHub organization access
- Admin permissions (required for OAuth or PAT creation)
Method 1: Connect GitHub using OAuth (recommended)
OAuth is the simplest and most seamless way to connect GitHub to LinearB.
- In LinearB, go to Settings → Company Settings and select the Git tab.
- Click Add Integration.
- Select GitHub.
- Click Authorize GitHub.
- If you have the required permissions, authorize LinearB to access your GitHub organization. Otherwise, request approval from a GitHub admin.
- Select the repositories you want to sync and click Connect GitHub.
Once connected, LinearB begins syncing repository data and enables metrics and automations such as WorkerB.
Method 2: Connect GitHub using a Personal Access Token (PAT)
If OAuth is not possible (for example, due to insufficient permissions), you can connect GitHub using a Personal Access Token (PAT).
Step 1. Create a Personal Access Token in GitHub
- Log in to GitHub.
- Create either a Fine-grained PAT or a Classic PAT.
- Set an expiration date. To avoid data gaps, we recommend choosing a long expiration period or no expiration (if supported).
Required permissions
| Classic PAT | Fine-grained PAT |
|
|
If write:repo-hook cannot be granted, see Alternative to write:repo-hook permission below.
- Copy the token. You will not be able to view it again.
Step 2. Add the GitHub PAT to LinearB
- In LinearB, go to Settings → Company Settings → Git.
- Click Add Integration and select GitHub.
- Select Classic or Fine-grained token.
- Paste the PAT and click Connect.
Alternative to write:repo-hook permission
LinearB uses repository webhooks for real-time data collection. If write:repo-hook cannot be granted, choose one of the following options:
Option 1: Delayed sync
LinearB syncs data every 2 hours instead of in real time. Metrics and notifications may be delayed.
Option 2: Organization-level webhook
Install a GitHub organization-level webhook to bypass repository-level permissions. See Installing a GitHub Organization-Level Webhook .
Reauthorizing an expired GitHub PAT
- Create a new PAT in GitHub.
- In LinearB, go to Settings → Company Settings → Git.
- Open the three-dot menu next to the GitHub integration.
- Select Reauthorize Git and paste the new token.
LinearB resumes syncing data using the new token.
Troubleshooting & support
- Verify the GitHub account has access to the selected repositories.
- Ensure required OAuth permissions or PAT scopes are granted.
- Contact support@linearb.io or join the Dev Interrupted Discord.
How did we do?
Connecting LinearB to GitHub With Read Only Permissions