# GitHub Setup Configure GitHub integration for your self-hosted PullApprove5 deployment. ## Create a GitHub App Fill in your details below and click "Create GitHub App" to open GitHub with the correct permissions pre-filled.

Use your GitHub Enterprise URL if applicable

The GitHub organization where the app will be created

The domain where your PullApprove5 instance will be hosted

Permissions

Contents: Read Metadata: Read Pull requests: Write Commit statuses: Write Members: Read Emails: Read

Events: push, pull_request, pull_request_review, membership, team

## Configure the GitHub App After creating your GitHub App, you'll need to generate a few credentials from the app settings page before configuring your deployment. ### Private Key Click **"Generate a private key"** to download a `.pem` file. This is a multiline file — how you pass it as an environment variable depends on your deployment method. Some systems require you to replace newlines with literal `\n` characters, while others (AWS Secrets Manager, Vault, K8s Secrets) support multiline values natively. PullApprove normalizes line endings on startup, so both formats work. ### Client Secret Click **"Generate a new client secret"** and save the value. ### Webhook Secret Generate a random secret, for example: ```bash python3 -c "import secrets; print(secrets.token_urlsafe(32))" ``` Paste this value into the **Webhook secret** field in your GitHub App settings. ## Environment Variables Set the following environment variables in your [deployment](/docs/self-hosted/deploy/). ```bash # Public URL of your GitHub App (found on the app's settings page) GITHUB_APP_URL=https://github.com/apps/pullapprove5-yourorg GITHUB_APP_ID=123456 GITHUB_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----\n" GITHUB_WEBHOOK_SECRET=your-generated-webhook-secret GITHUB_CLIENT_ID=Iv23_abc123def456 GITHUB_CLIENT_SECRET=your-client-secret # GitHub Enterprise Server only # GITHUB_URL=https://github.example.com # GitHub Enterprise Server only: opt in to real avatars if you've # disabled private mode. Defaults off — initials are shown otherwise. # See "GHES avatars" below. # GITHUB_AVATARS_PUBLIC=true # Status check name # (default: "pullapprove5") GITHUB_STATUS_CONTEXT=pullapprove5 # Comma-separated usernames to ignore webhooks from # (e.g., your-app[bot]) GITHUB_WEBHOOK_SENDER_BLOCKLIST=your-app-name[bot] ``` ## Verify Test that GitHub can deliver webhooks to your PullApprove5 instance: 1. Go to your GitHub App settings page 2. Click on the **"Advanced"** tab 3. Scroll down to "Recent Deliveries" 4. Click **"Redeliver"** on the ping webhook 5. Verify the delivery shows a successful response (status 200) ![GitHub App Advanced tab showing Recent Deliveries and Redeliver button](/assets/docs/img/self-hosted-github-recent-deliveries.71903c5.png) If the webhook ping is successful, your self-hosted instance is ready. You can now install the GitHub App on repositories to start using PullApprove5. ## GHES avatars GitHub Enterprise Server runs in **private mode** by default, which gates every web-tier URL — including `/avatars/u/` — behind a session cookie. PullApprove can't replay that cookie when the browser loads an `` for an avatar, so by default PullApprove renders **deterministic initials badges** for user and organization avatars on GHES. If you've disabled private mode on your GHES instance (Management Console → "Require authentication for all pages and API endpoints" off), set `GITHUB_AVATARS_PUBLIC=true` in PullApprove's environment to emit real avatar URLs instead of initials. On `github.com` deployments avatars always work — the public CDN handles everything and the variable is ignored.