Connect GitHub
Register the Init GitHub App and install it on a customer organization or account.
Before you start
GitHub setup has two distinct stages:
- Engine operator registers the platform GitHub App once (registration).
- Connection admin/user installs that app on their organization or personal account (installation).
You need:
- Permission to create a GitHub App under the operator GitHub org or user that owns the platform app.
- Organization owner (or permitted admin) rights on the customer GitHub account that will install the app.
- The engine public base URL for callback and webhook URLs.
Configure the provider
Register the platform GitHub App (Engine operator)
-
In GitHub, open Developer settings → GitHub Apps → New GitHub App.
-
Set the Callback URL to:
{FUSE_PUBLIC_URL}/v1/oauth/github/callback -
Configure webhook delivery to:
{FUSE_PUBLIC_URL}/v1/webhooks/githuband set a webhook secret.
-
Under Permissions, grant only the repository and organization permissions required by the Init actions you expose. Prefer read-only where possible.
-
Choose whether the app can be installed on any account or only on the owning account.
-
After creation, generate a private key and note the App ID, App slug, Client ID, and Client Secret.
-
Set the GitHub platform secrets in Doppler (
integrations-api/ matching env), using.env.exampleas the name catalog:GITHUB_APP_IDGITHUB_APP_SLUGGITHUB_APP_PRIVATE_KEY(PEM private key)GITHUB_CLIENT_IDGITHUB_CLIENT_SECRETGITHUB_WEBHOOK_SECRET
Never commit these values.
Registration creates the app identity. It does not grant access to customer repositories until someone installs the app.
Install on a customer account (Connection admin/user)
Installation selects the org/user and repositories the app may access. That step happens through Init Connect, not by pasting tokens.
Connect to Init
- Connection admin/user starts a GitHub Connect session.
- GitHub opens the install flow for the platform app slug (
https://github.com/apps/{GITHUB_APP_SLUG}/installations/new). - Choose the organization or user, then All repositories or Only select repositories.
- Complete any user authorization step Init requires for the installation callback.
- Init verifies the installation ID against the expected App ID and stores the connection.
No customer credential form fields are submitted for GitHub.
Permissions
Installation permissions are those configured on the GitHub App. The generated scope matrix maps Init actions to GitHub App permission strings (for example repository contents or issues).
Organization owners can restrict who may install apps. Repository admins may be limited to installing with access only to repositories they administer.
If Init enables optional issue-write actions in your deployment, the app registration must include the matching issues write permission before customers reconnect.
Verify the connection
- Confirm Connect completes and Init shows an active GitHub connection bound to the expected installation.
- Run a safe read-only call such as listing repositories visible to the installation.
- Success looks like a verified installation ID for the platform App ID and a read response without
401/403from GitHub.
Rotate or revoke access
- Rotate app credentials (Engine operator): generate a new private key or client secret in GitHub App settings, update
GITHUB_APP_PRIVATE_KEY/GITHUB_CLIENT_SECRET/GITHUB_WEBHOOK_SECRET, then revoke old material. - Change repository access (Connection admin/user): update the installation’s repository selection in GitHub, or reconnect through Init.
- Revoke: uninstall the GitHub App from the organization or user, then delete or reconnect the Init connection.
- After increasing app permissions, customers must accept the permission update on the installation (reconnect/reauthorize as prompted).
Troubleshooting
| Symptom | What to check |
|---|---|
| Callback mismatch | Callback URL must be {FUSE_PUBLIC_URL}/v1/oauth/github/callback. |
| Installation not verified | App ID in GitHub must match GITHUB_APP_ID; wrong app slug installs a different app. |
| Missing repository access | Installation may be limited to selected repos; adjust selection or reinstall. |
| Permission denied on actions | App permissions must cover the action; accept permission updates after operator changes. |
| Org blocks installs | Ask an organization owner to approve or install the app. |