GitHub Enterprise Setup#
This guide walks through connecting MergeMonkey to a self-hosted GitHub Enterprise Server (GHES) instance. The flow is a one-time registration: you create an OAuth App and a GitHub App on your GHES instance, then paste the credentials into MergeMonkey's self-managed onboarding form. After that, any user on your instance can sign in normally.
For github.com see GitHub Cloud.
Integration overview#
Registering your instance sets up four moving parts:
OAuth App
GitHub App
Webhook configuration
Network access
Make sure you have administrative access to your GHES instance
(for creating an OAuth App and a GitHub App), and confirm that our ingress at
https://app.mergemonkey.dev/webhooks/github is reachable from your
network. If you're behind a strict firewall, allowlist MergeMonkey's outbound IPs.
Step 1 — Start the self-managed flow#
Open the MergeMonkey login page and pick Self-Managed
Visit mergemonkey.dev/auth/login and click Continue with GitHub. Pick Self-Managed from the Cloud / Self-Managed choice that appears.

Enter your instance URL
Enter the URL of your GitHub Enterprise Server (for example
https://github.example.com) and click Continue. MergeMonkey checks whether your organization has already been registered.
See the registration form
If your instance is new to MergeMonkey, you'll land on the registration screen with two sections — OAuth App and GitHub App. Leave this tab open; you'll switch between it and your GHES admin UI for the next two steps.
Step 2 — Create the OAuth App#
The OAuth App authenticates MergeMonkey users against your GHES instance.
Open OAuth Apps on GHES
In GitHub Enterprise: Settings → Developer settings → OAuth Apps → New OAuth App.
Fill in the application details
Use these values:
Field Value Application name MergeMonkeyHomepage URL https://mergemonkey.devAuthorization callback URL https://mergemonkey.dev/auth/callbackCallback URL must match exactlyThe OAuth spec rejects mismatched redirect URIs, including differences in trailing slashes or
httpvshttps. Copy the callback URL straight from the MergeMonkey registration form.Register and grab the credentials
Click Register application. GHES shows the Client ID immediately; click Generate a new client secret and copy the Client Secret (displayed only once).

Paste into MergeMonkey
Return to the MergeMonkey registration tab and paste the Client ID and Client Secret into the OAuth App section.
Step 3 — Create the GitHub App#
The GitHub App is what reads code and posts review comments on pull requests.
Open GitHub Apps on GHES
Settings → Developer settings → GitHub Apps → New GitHub App.
Configure basic settings
Field Value GitHub App name MergeMonkey(must be unique on your instance)Homepage URL https://mergemonkey.devWebhook URL https://app.mergemonkey.dev/webhooks/githubWebhook secret Generate a strong random string and save it Request user authorization (OAuth) during installation Unchecked Where can this GitHub App be installed? Any account Set repository permissions
Under Repository permissions:
- Pull requests — Read & write
- Contents — Read only
- Checks — Read & write
- Commit statuses — Read & write
- Issues — Read & write
- Metadata — Read only (automatic)
Subscribe to events
Under Subscribe to events check:
- Pull request
- Pull request review
- Pull request review comment
- Pull request review thread
- Issue comment
- Issues
Create the app and collect credentials
Click Create GitHub App. From the app's settings page:
- Note the App ID (top of the page).
- Note the Client ID.
- Click Generate a new client secret, copy it.
- Scroll to Private keys → Generate a private key. A PEM file downloads automatically — keep it handy.
Secrets are shown onceThe client secret is visible right after generation only. The private key PEM cannot be retrieved later — if you lose it, generate a new one.
Paste into MergeMonkey
On the MergeMonkey registration tab fill the GitHub App section:
Credential Where to find it Notes App IDGitHub App settings → top of the page — Client IDGitHub App settings → About — Client SecretGenerated in the previous sub-step — Webhook SecretThe string you entered in Step 3.2 — Private Key (PEM)Downloaded .pem file Paste the full contents, including BEGIN/END lines.
Step 4 — Submit and install#
Submit the registration form
Click Continue at the bottom of the MergeMonkey form. We validate the credentials by making a test API call to your instance and, on success, store them (encrypted at rest).
Install the GitHub App on your organization
After validation, MergeMonkey redirects you to your GitHub App's install page on GHES. Pick the organization, choose All repositories or a specific subset, and confirm.
Open a pull request
Push a test commit or open any existing PR. A review comment from
mergemonkeyhqshould appear within ~60 seconds.
Networking checklist#
MergeMonkey calls your GHES API (outbound from our worker) and GHES must deliver webhooks to our ingress (inbound to your firewall). If either leg is blocked, reviews won't run.
- Outbound from MergeMonkey worker → your GHES API (HTTPS 443).
- Inbound from GHES →
https://app.mergemonkey.dev/webhooks/github. - If your GHES instance lives behind a VPN with no public egress, contact us — we can run a MergeMonkey worker inside your network.
Troubleshooting#
"Your organization is not registered with us"#
Expected on the first attempt for a new instance. Complete Step 2 + Step 3 to register. Subsequent users on the same instance skip registration entirely.
Webhook deliveries fail with 401 or 403#
The Webhook Secret in MergeMonkey must match the one you entered when creating the GitHub App. If they diverge, every delivery is rejected. Fix: regenerate the secret on GHES and update the value in MergeMonkey via /platform/settings/installations.
Reviews never appear#
Check webhook delivery logs: GHES → your org → Settings → GitHub Apps → MergeMonkey → Advanced → Recent Deliveries. A red X with a connection error means our ingress is unreachable from GHES. An HTTP 401 or 403 means a signature mismatch. A green check but no review means the job is queued but the worker is throttled or at quota.
"Bad credentials" when MergeMonkey validates the form#
One of the credentials is wrong. Most common cause: pasting a truncated PEM (missing the -----BEGIN RSA PRIVATE KEY----- or end line). Open the downloaded PEM file in a plain-text editor and paste the whole thing.