Choose a GitHub Copilot connection
Compare GitHub Copilot connection types and choose the option that matches your GitHub organization, token permissions, and Enterprise environment.
Overview
LinearB supports multiple ways to connect GitHub Copilot. Choose a connection based on your GitHub environment, the scope of data you need, and the authentication method your organization permits.
Choose a Connection Type
Classic Token
Choose Classic token when you can use a classic GitHub Personal Access Token and need to collect Copilot usage across one or more organizations accessible to the token owner.
Best for:
- Standard GitHub organizations
- Collecting data from multiple organizations with one token
- Organizations that permit classic Personal Access Tokens
- Selecting organizations manually, by regular expression, or including all accessible organizations
Required token scopes:
read:userread:org
Connect GitHub Copilot using a classic token
Fine-Grained Token
Choose Fine-grained token when your organization requires more restrictive token permissions and you need to connect a single GitHub organization.
Best for:
- Organizations that restrict or discourage classic Personal Access Tokens
- Connecting one GitHub organization
- Applying narrowly scoped, read-only permissions
Required organization permissions:
- Organization Copilot metrics: Read-only
- Members: Read-only
The token owner must also have permission to view Copilot metrics for the selected organization.
Connect GitHub Copilot using a fine-grained token
Enterprise
Choose Enterprise when you need to collect GitHub Copilot metrics across a GitHub Enterprise environment.
Best for:
- Enterprise-wide Copilot reporting
- Organizations managed under a GitHub Enterprise account
- Collecting Copilot metrics across multiple enterprise organizations
Connect GitHub Copilot Enterprise
Enterprise on ghe.com
Use the Enterprise connection guidance for GitHub Enterprise Cloud with data residency when your enterprise is hosted on a custom *.ghe.com subdomain.
Best for:
- GitHub Enterprise Cloud with data residency
- Enterprises hosted on a custom
<subdomain>.ghe.comdomain - Metrics requests that must use the enterprise-specific API base URL
Connect GitHub Copilot Enterprise on ghe.com
Quick Recommendation
- Use a classic token when you need access to multiple GitHub organizations and your security policy permits classic Personal Access Tokens.
- Use a fine-grained token when you need narrowly scoped, read-only access to one organization.
- Use Enterprise when you need Copilot reporting across a GitHub Enterprise environment.
- Follow the ghe.com guidance when your Enterprise Cloud environment uses a custom data-residency subdomain.
Add a GitHub Copilot Connection
- Go to Settings → Company Settings → AI Tools → Integrations.
- Click Add New.
- Select GitHub Copilot and click Continue.
- Select Classic token, Fine-grained token, or Enterprise.
- Click Continue.
- Follow the instructions for the selected connection type.
What Data Is Available?
GitHub Copilot connections provide adoption and accepted-lines data in AI Analytics.
Model, token, and estimated-consumption data is not currently available through GitHub Copilot connections.
Troubleshooting
If LinearB cannot validate the connection, verify that:
- GitHub Copilot usage metrics are enabled.
- The token is valid and has the required permissions.
- The token owner can access the selected organization or enterprise.
- The selected connection type matches the token and GitHub environment.
For error-specific guidance, see Troubleshoot GitHub Copilot integrations .
Related Articles
How did we do?
Choose a Claude Code connection
Connect Amazon Q Developer to LinearB