About GitHub
Serval’s GitHub integration connects your GitHub Organization, User account, or Enterprise to Serval so workflows can read repositories, manage teams, and call the GitHub API on your behalf. It authenticates exclusively through GitHub Apps - never personal access tokens. You choose between two Serval-managed apps with different access tiers, or bring a GitHub App owned by your own organization. Authentication: GitHub App installation only. Pick a Serval-managed app - Full Admin Access or Code Contributor Access - or choose Use Your Own GitHub App. The bring-your-own path offers two options: let Serval walk you through installing the app (Install with Serval), or connect an app your GitHub organization admin already installed out of band (App already installed) by pasting its credentials. Workflow API calls never rely on a stored long-lived token: a fresh, short-lived installation access token is minted for every call. Data sync: Workflow API calls run on demand. For Access Management, GitHub Teams are ingested on a fixed schedule every 16 hours, always as a full sync (GitHub does not support delta sync).What the GitHub integration enables
Get your credentials
What you need depends on which connect option you choose in the Connect GitHub modal.- Serval-managed app (Full Admin or Code Contributor)
- Use Your Own GitHub App
- Use Your Own GitHub App (already installed)
Connect in Serval
- Serval-managed app
- Use Your Own GitHub App
- Use Your Own GitHub App (already installed)
Open the Connect GitHub modal
Install the app on GitHub
Return to Serval
Connecting GitHub Enterprise
In GitHub Enterprise, choose Install with Serval for a new installation or App already installed to connect an existing enterprise installation with its App ID, Installation ID, and private key. Reconnecting: Serval restores the original connect mode and saved app details, including the App ID and Installation ID. Private keys and client secrets must be entered again. For a new app, enter your enterprise account name before opening the creation link. Serval opens that enterprise’s registration page with Request user authorization (OAuth) during installation selected. Paste the Redirect URI shown in the Enterprise connect form into GitHub, leaving Allow wildcard matching off. Return to Serval and complete Connect; saving the app’s settings alone does not connect it.Verifying the connection
Serval runs three health checks against a connected GitHub integration:-
Test GitHub App Installation - verifies a token can be minted and works, by making a small test request (a sample of accessible repositories for org/user installs, or a single enterprise team for Enterprise installs).
- Success:
GitHub App installation for [name] is properly configured and functional- or, for enterprise installs,GitHub Enterprise App installation for [name] is properly configured and functional - Failure:
GitHub App installation token for [name] is invalid or not working.followed by a status-specific hint:- 401 -
The GitHub App installation token is invalid or expired. Please reinstall the GitHub App. - 403 -
The GitHub App may not have the required permissions. Check the app's permission configuration. - 404 -
The GitHub App installation was not found. It may have been uninstalled or it may be awaiting approval from an admin of [name]. Visit https://github.com/organizations/[name]/settings/installations for more info. - 500/502/503 -
GitHub returned a server error. This is likely a temporary issue with GitHub's API - please try again later.
- 401 -
- Success:
-
List GitHub Teams - confirms the integration can list teams in the connected scope (org teams, or enterprise teams for Enterprise installs).
- Success:
Successfully listed [number] teams in [name]- or, for enterprise installs,Successfully listed [number] enterprise teams in [name] - Failure:
Unable to list GitHub teams in [name].followed by the same 401/403/server-error hints; the generic 404 variant readsThe requested resource was not found. This may indicate missing permissions or incorrect configuration.
- Success:
-
List GitHub Repositories - confirms the integration can list accessible repositories for the org. Enterprise installs skip this check and report it as passing.
- Success:
Successfully listed [number] repositories for [name]- enterprise installs instead reportNot applicable: this check only validates org/user installs. Enterprise install ([name]) covered by test-installation-token. - Failure:
Unable to list GitHub repositories for [name].followed by the same 401/403/404 (generic)/server-error hints.
- Success:
Gotchas and troubleshooting
Non-owner installs land in pending approval
Non-owner installs land in pending approval
GitHub installation is pending approval. Once approved, the connection completes automatically - Serval matches the pending record even if the approval finishes outside the original browser session, returning the approver to Serval (or showing GitHub installation completed. You can close this window. when no return destination was recorded). If more than one pending install exists for the same GitHub target, completion errors with multiple pending installations found for this GitHub target - please keep only one.Connecting an app installed out of band (no inline install)
Connecting an app installed out of band (no inline install)
Custom-app installs have a 10-minute approval window
Custom-app installs have a 10-minute approval window
GitHub App installation is pending approval. Ask a GitHub organization owner to approve the app, then reconnect it in Serval. - your credentials are deliberately kept so an immediate retry works, but only until the 10 minutes expire, after which you’ll see Invalid or expired OAuth state and must resubmit the form.Reconnecting a custom app requires re-entering both secrets
Reconnecting a custom app requires re-entering both secrets
clientSecret is required / privateKey is required. There is no keep-existing-secret path. Have the .pem file and a client secret ready (or generate fresh ones in GitHub) before you start.Enterprise installs have no org or repo permissions
Enterprise installs have no org or repo permissions
This workflow requires a GitHub organization install, but the connected install is enterprise-scoped ([name]). Team ingestion returns an empty set for enterprise installs, the repository health check is reported as not applicable, and enterprise-only endpoints require the dedicated enterprise API action.Use GitHub usernames, not email addresses
Use GitHub usernames, not email addresses
Invalid GitHub username: '[username]'. Please provide a GitHub username (not an email address). GitHub usernames typically contain only letters, numbers, and hyphens. Access Management provisioning is likewise instructed never to guess: its input is annotated “The target user’s GitHub username. Do not make guesses about the user’s username. Ask the user for their GitHub username.”Uninstalling the app in GitHub breaks the connection immediately
Uninstalling the app in GitHub breaks the connection immediately
The GitHub App installation was not found. It may have been uninstalled or it may be awaiting approval from an admin of [name]. Visit https://github.com/organizations/[name]/settings/installations for more info.Repository selection and access tier are fixed at install time
Repository selection and access tier are fixed at install time
Teams sync is a full refresh every 16 hours
Teams sync is a full refresh every 16 hours
Need help? Contact support@serval.com for assistance with your GitHub integration.

