# The GitHub App

Every install has its own GitHub App, so your customers see your name when they install it.

1. Open **Admin → Settings → Git sync** and click **Create GitHub App**.
2. Give it a name (unique on GitHub, up to 34 characters) and, if your team should manage it together, a GitHub organisation.
3. Click **Continue to GitHub**, check the name, and confirm. GitHub creates the app and sends you back; JustDocs saves its id, keys and secrets, encrypted.
4. Click **Test** to check GitHub accepts the keys.

The app asks for read and write access to repository contents, read access to metadata, and push notices. Customers choose which repositories it can reach.

**Making it by hand** (for example, if your install isn't reachable yet): create a GitHub App on GitHub with the callback URL `https://your-domain.example/app/docs/git/github/callback` and "Request user authorization (OAuth) during installation" ticked, the webhook URL `https://your-domain.example/__git/github` with a secret, the permissions Contents: read and write and Metadata: read, and the Push event. Then fill in the app id, slug, client id and secret, webhook secret and private key under **Set up by hand**.

**Removing the app** stops every connected site from syncing until a new app is set up and the sites connect again. Delete the app on GitHub too.
