Skip to main content

Connect GitHub Copilot Enterprise on ghe.com

Connect GitHub Copilot Enterprise Cloud with data residency to LinearB when your enterprise uses a custom ghe.com subdomain.

Steven Silverstone
Updated by Steven Silverstone

Overview

Connect GitHub Copilot Enterprise to LinearB when your organization uses GitHub Enterprise Cloud with data residency and is hosted on a custom *.ghe.com subdomain.

This configuration uses the Enterprise GitHub Copilot connection type in LinearB but directs Copilot metrics requests to your enterprise-specific GitHub API environment.

When to use this guide: Use this article only if your Enterprise is hosted at a custom domain such as <your-subdomain>.ghe.com. For standard GitHub-hosted Enterprise Cloud environments, see Connect GitHub Copilot Enterprise .
Connection limit: Only one active GitHub Copilot Enterprise integration can be connected at a time. A failing Enterprise integration still counts as active.

Data Provided by GitHub Copilot Enterprise

Depending on the data returned by GitHub, the integration can provide:

  • Enterprise and organization-level Copilot adoption
  • Active Copilot users
  • Code suggestions and acceptances
  • Accepted lines of code
  • Adoption trends across enterprise organizations and teams

Adoption and accepted-lines data appears in AI Analytics.

Note: Model, token, and estimated-consumption data is not currently available through GitHub Copilot integrations.

Historical Data and Collection Cadence

  • Up to 90 days of historical Copilot data can be backfilled during the initial connection.
  • Activity outside the available initial backfill window does not appear in LinearB.
  • After the initial connection, Copilot data is updated daily.

Before You Begin

Verify that you have:

  • Access to AI Tools settings in LinearB.
  • GitHub Enterprise owner or equivalent administrative access.
  • A GitHub Enterprise Cloud environment hosted on a custom *.ghe.com domain.
  • Copilot usage metrics enabled for the Enterprise and relevant organizations.
  • A token created in the *.ghe.com environment with access to the required Copilot metrics.
  • Access to the Enterprise organizations you want LinearB to include.
Security: Treat the token like a password and store it securely. Rotate it according to your organization’s security policy.

Confirm the Enterprise Domain and API URL

Your GitHub Enterprise Cloud domain uses the following format:

https://<your-subdomain>.ghe.com

Its corresponding API base URL is:

https://api.<your-subdomain>.ghe.com

Replace <your-subdomain> with your organization’s GitHub Enterprise subdomain.

Important: Use the domain and API environment associated with your data-residency Enterprise. Standard github.com endpoints do not represent the same tenant.

Enable Copilot Usage Metrics

Confirm that Copilot usage metrics are enabled in the GitHub Enterprise and organization settings for your *.ghe.com tenant.

If Copilot usage metrics are not enabled:

  • LinearB cannot retrieve Copilot usage data.
  • The integration may return a 403 authorization error.
  • Copilot metrics do not appear in LinearB.

Prepare the Enterprise Token

Create the authentication token within your *.ghe.com tenant.

Confirm that:

  • The token is valid and has not expired.
  • The token owner can access the GitHub Enterprise account.
  • The token can read Copilot metrics for the required Enterprise scope.
  • The token can access the organizations you want to include.
  • Any required Enterprise or organization approval has been completed.
Important: A token created for a standard github.com environment may not authenticate against your *.ghe.com tenant. Create and authorize the token in the correct Enterprise environment.

Connect GitHub Copilot Enterprise in LinearB

  1. Go to Settings → Company Settings → AI Tools → Integrations.
  2. Click Add New.
  3. Select GitHub Copilot.
  4. Click Continue.
  5. Select Enterprise.
  6. Click Continue.
  7. Enter the requested GitHub Enterprise token.
  8. Enter the Enterprise name and custom *.ghe.com subdomain where requested.
  9. Configure the Enterprise or organization scope displayed in LinearB.
  10. Click Connect.

LinearB validates the token, Enterprise environment, and Copilot permissions. When validation succeeds, the Enterprise integration appears in the Connected list.

Duplicate integrations: If another active GitHub Copilot Enterprise integration already exists, disconnect it before connecting another one.

Verify the Connection

  1. Open Settings → Company Settings → AI Tools → Integrations.
  2. Select Connected.
  3. Select the GitHub Copilot Enterprise integration.
  4. Confirm that its status is Connected.
  5. Review the configured Enterprise environment and organization scope.
  6. Allow time for the initial historical import and daily processing.
  7. Open AI Analytics and confirm that Copilot data appears.

Edit the Enterprise Integration

Use Edit mode to replace the token or update the Enterprise name and custom subdomain.

  1. Open Settings → Company Settings → AI Tools → Integrations.
  2. Select Connected.
  3. Select the GitHub Copilot Enterprise integration.
  4. Under Main Settings, click Edit.
  5. Update the available token, Enterprise name, or custom subdomain settings.
  6. Click Save changes to apply the update or Cancel to discard it.
Permissions: Anyone who has access to AI Tools settings can edit the integration. No additional LinearB permission is required specifically for the Edit action.
Important: If you change the Enterprise name or custom subdomain, re-enter the GitHub token before saving.

What happens to historical data?

Editing the Enterprise integration does not delete previously collected Copilot metrics.

  • Token-only changes are picked up during scheduled collection.
  • Changing the Enterprise name or custom subdomain can trigger recollection of up to 90 days of recent data.
  • Recollected records are updated in place and are not counted twice.
  • Data older than the recollection window remains unchanged.
  • If the integration is pointed to another Enterprise, metrics previously collected from the original Enterprise remain in LinearB.
Important: Changing the connected Enterprise or subdomain does not remove data collected from the previous environment. Review the change carefully before saving.

Disconnect or Reconnect

Disconnecting GitHub Copilot Enterprise stops new data collection and moves the integration to the Disconnected list. Previously collected data is preserved.

Disconnect the integration

  1. Open Settings → Company Settings → AI Tools → Integrations.
  2. Select Connected.
  3. Select the GitHub Copilot Enterprise integration.
  4. Click Disconnect.
  5. Confirm the action.

Reconnect the integration

  1. Open Settings → Company Settings → AI Tools → Integrations.
  2. Select Disconnected.
  3. Select the GitHub Copilot Enterprise integration.
  4. Click Reconnect.
  5. Enter a replacement token created in the correct *.ghe.com tenant if the saved token is no longer valid.
  6. Complete validation to restore the integration.

LinearB validates the token and saved Enterprise configuration before restoring the connection.

Note: If the saved token has expired or been revoked, create a valid replacement token in the *.ghe.com tenant and enter it during the reconnect flow. You do not need to create another Enterprise integration.

Learn more:


Troubleshooting

403 Authorization Error

  • Confirm that Copilot usage metrics are enabled.
  • Verify that the token was created in the correct *.ghe.com tenant.
  • Confirm that the token can read Copilot metrics for the required scope.
  • Verify that required Enterprise or organization approval has been completed.

Connection Error

  • Confirm that the token is valid and has not expired or been revoked.
  • Verify that the selected connection type is Enterprise.
  • Confirm that the Enterprise subdomain is correct.
  • Verify that the integration uses the correct Enterprise API environment.
  • Confirm that the token can access the selected organizations.
  • Select the integration, click Edit, correct the configuration, and click Save changes.

Enterprise Domain Not Found

  • Confirm that the domain uses the format <your-subdomain>.ghe.com.
  • Verify the exact subdomain with your GitHub Enterprise administrator.
  • Confirm that you are not using a standard github.com URL for a data-residency tenant.

Expected Organizations Are Missing

  • Confirm that the organizations belong to the connected *.ghe.com Enterprise.
  • Verify that the token owner can access the missing organizations.
  • Review the Enterprise or organization scope configured in LinearB.

No Copilot Data Appears

  • Allow time for the initial import and daily processing.
  • Confirm that developers are actively using Copilot in the included organizations.
  • Verify that GitHub users are mapped to the appropriate LinearB users.
  • Confirm that the expected organizations and repositories are represented in LinearB.

Learn more:


Known Limitations

  • This flow applies only to GitHub Enterprise Cloud environments hosted on *.ghe.com.
  • Copilot data is updated daily, not in real time.
  • Historical activity outside the available initial backfill window is not imported during the first connection.
  • Available metrics depend on the data returned by GitHub.
  • Model, token, and estimated-consumption data is not currently available.

How did we do?

Connect GitHub Copilot Enterprise

Connect GitHub Copilot using a classic token

Contact