GitHub Enterprise (Self-Hosted)
Connect a self-hosted GitHub Enterprise Server instance to Obtrace for repository access and automated remediation PRs.
Overview
Obtrace supports GitHub Enterprise Server (GHES) alongside GitHub.com. Each tenant can connect to a different self-hosted GitHub instance, enabling organizations that run their own GitHub infrastructure to use all Obtrace features: repository catalog, file context for AI analysis, automated remediation PRs, and fix outcome tracking.
Prerequisites
- GitHub Enterprise Server 3.0+
- A GitHub App registered on your GHES instance
- Network connectivity between Obtrace and your GHES API endpoint
- TLS certificate trusted by Obtrace (self-signed certs require CA bundle configuration)
Step 1: Register a GitHub App on your GHES instance
- Navigate to
https://YOUR-GHES-HOST/settings/apps/new - Fill in the application details:
- GitHub App name:
Obtrace - Homepage URL: Your Obtrace frontend URL
- Callback URL:
https://YOUR-OBTRACE-HOST/oauth/callback/github-self - Setup URL:
https://YOUR-OBTRACE-HOST/oauth/github-app/setup - Webhook URL:
https://YOUR-OBTRACE-HOST/webhooks/github
- GitHub App name:
- Set the required permissions:
- Repository contents: Read & Write
- Pull requests: Read & Write
- Checks: Read
- Metadata: Read (mandatory)
- Subscribe to events:
- Pull request
- Generate a private key and download it
- Note the App ID, Client ID, and Client secret
Step 2: Configure Obtrace environment variables
Set these environment variables on the control-plane-api service:
Step 3: Connect a repository in the Obtrace UI
- Go to Settings > Projects > Your Project > Apps > Your App > Repositories
- Click Connect Repository
- Select GitHub as the provider
- Enter your GHES hostname in the Host field (e.g.,
github.mycompany.com) - Install the GitHub App on your GHES instance when prompted
- Select the repository and branch
- Save the connection
Step 4: Configure the webhook
For fix outcome tracking (measuring whether automated fixes reduce error rates), configure the GHES webhook:
- Go to your GitHub App settings on GHES
- Under Webhook, set the URL to:
https://YOUR-OBTRACE-HOST/webhooks/github - Set the secret to match
CONTROL_PLANE_GITHUB_APP_WEBHOOK_SECRET - Select Pull request events
- Activate the webhook
How it works
When a repository is connected with a host value:
- All GitHub API calls use
https://YOUR-GHES-HOST/api/v3instead ofhttps://api.github.com - GitHub App installation tokens are created against your GHES instance
- Remediation PRs are created on your GHES instance
- File content is fetched from your GHES instance for AI context
- Webhook signatures are verified using your configured secret
API reference
Connect a repository
List repositories from self-hosted instance
Network requirements
| Source | Destination | Port | Protocol |
|---|---|---|---|
| Obtrace control-plane | GHES API | 443 | HTTPS |
| GHES webhooks | Obtrace control-plane | 443 | HTTPS |
Troubleshooting
Certificate errors
If your GHES uses a self-signed or internal CA certificate, ensure the CA bundle is available to the Obtrace control-plane container. Mount the CA certificate and set:
API version compatibility
Obtrace uses GitHub API version 2022-11-28. Ensure your GHES version supports this API version (GHES 3.0+).
Token refresh failures
If OAuth token refresh fails, the user may need to re-authorize the GitHub App on the GHES instance. Check the connection status in Settings > Git Connections.