> ## Documentation Index
> Fetch the complete documentation index at: https://docs.overcut.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub Enterprise

> Connect GitHub Enterprise Server or GitHub Enterprise Cloud with data residency (name.ghe.com) from the Integrations page, through a private GitHub App on your organization.

Use this path when your code lives on **GitHub Enterprise Server** (GHES) or on
**GitHub Enterprise Cloud with data residency** (a `<name>.ghe.com` tenant).
You connect it from **Integrations** in a few minutes. Overcut connects through
its own private GitHub App, created on the organization that owns your
repositories, so access stays limited to that organization.

Each connection gets its own GitHub App. You can connect several organizations,
or several GitHub Enterprise instances, and they run alongside github.com
connections in the same workspace. Each connection shows the **GitHub
Enterprise** provider label in **Integrations**.

> [!NOTE]
>
> Not your setup? See [Which setup do I need?](https://docs.overcut.ai/docs/integrations/github#which-setup-do-i-need).
> For repositories on github.com (including GitHub Enterprise Cloud without data
> residency), use [GitHub on Overcut Cloud](https://docs.overcut.ai/docs/integrations/github/cloud.md).

## Prerequisites

* **A GitHub Enterprise organization**, and someone who can create GitHub Apps
  in it: an organization owner or a GitHub App manager. If that is not you,
  Overcut prepares the settings for you to send them.
* **For GitHub Enterprise Server**: version 3.12 or later, reachable from the
  internet over HTTPS, with a TLS certificate issued by a public certificate
  authority. Private certificate authorities are not supported yet.
* **Network access in both directions**:
  * Overcut reaches your GitHub Enterprise over HTTPS (web, API, and git). If
    it sits behind a firewall, or your ghe.com enterprise uses an IP allow
    list, allow the [Overcut Cloud egress range](https://docs.overcut.ai/docs/network-allowlisting.md).
  * Your GitHub Enterprise delivers webhooks to Overcut over HTTPS.

## Step 1: Start the connection

**1. Open the GitHub Enterprise form**

In Overcut, open **Integrations**, select **Add provider**, then choose
**GitHub Enterprise**.

**2. Enter your instance and organization**

* **GitHub Enterprise URL**: the address you open GitHub at, without any
  path. For example `https://acme.ghe.com` or `https://github.acme.com`.
* **GitHub organization**: the organization that owns the repositories,
  as it appears in its URL. For `https://acme.ghe.com/my-org`, enter
  `my-org`. The GitHub App is created in this organization.

Select **Continue**. Overcut shows the **App settings** for your
connection.

You can close the dialog at any point and come back later. Reopening
**GitHub Enterprise** with the same URL and organization resumes the same
setup, and the settings stay valid.

## Step 2: Create the GitHub App

The **App settings** list everything the App needs: its name, homepage URL,
callback URL, webhook URL, webhook secret, permissions, and events. Select
**Copy settings** to copy them as text.

> [!WARNING]
>
> The settings include the webhook secret. Share them privately, for example in a
> direct message to your GitHub admin, not in a public channel or ticket.

**1. Open the organization's new App page**

Create the App under the **organization**, not under a personal account.
On your GitHub Enterprise, open:

```
https://<your-github-enterprise>/organizations/<organization>/settings/apps/new
```

Or go to the organization's **Settings -> Developer settings -> GitHub Apps
-> New GitHub App**.

**2. Fill in the settings**

Copy each value from the **App settings**:

* **GitHub App name**, **Homepage URL**, and **Callback URL**
* **Request user authorization (OAuth) during installation**: checked
* **Webhook**: **Active** checked, with the **Webhook URL** and
  **Webhook secret** from the settings
* **Repository permissions**, exactly as listed
* **Subscribe to events**, exactly as listed
* **Where can this GitHub App be installed**: **Only on this account**

Select **Create GitHub App**.

**3. Collect the credentials**

On the new App's settings page:

* Copy the **App ID** and the **Client ID**.
* Select **Generate a new client secret** and copy it.
* Select **Generate a private key**. A `.pem` file downloads.

## Step 3: Install and connect

**1. Enter the App's credentials**

Back in the Overcut dialog, enter the **App ID**, **Client ID**, and
**Client secret**. For **Private key (.pem)**, paste the full contents of
the downloaded file, including the `BEGIN` and `END` lines.

Select **Save and install**. Overcut checks the credentials with your
GitHub Enterprise before going on.

**2. Install the App**

Your GitHub Enterprise opens in a popup. Sign in if asked, choose the
repositories the App may access, and complete the installation.

The popup closes and Overcut shows **Connected successfully**. The
organization appears in **Integrations** with the **GitHub Enterprise**
provider label.

**3. Register and activate repositories**

Open the GitHub Enterprise connection, select **Add Repositories**, and
register the repositories you want Overcut to use. Then set each one to
**Active**. See [Repositories](https://docs.overcut.ai/docs/get-started/repositories.md).

**4. Verify webhook delivery**

In the App's settings on your GitHub Enterprise, open **Advanced -> Recent
Deliveries** and confirm the response code is **200**. Comment on a test
issue in a connected repository to produce a delivery.

Once connected, GitHub Enterprise repositories work like github.com
repositories: triggers, slash commands, agent tools, `git.clone`, and
`ci.executeWorkflow` all support them. In a
[repository selector](https://docs.overcut.ai/docs/repositories/repository-selector.md), set **Git
Provider** to **GitHub Enterprise** to target only these repositories.

## Troubleshooting

* **"This App belongs to ..., not ..."**: the App was created under a personal
  account or another organization. Create it under the organization you
  entered, from the organization's settings, then enter the new App's
  credentials.
* **"This App is not on ..."**: the App was created on a different GitHub
  instance than the URL you entered.
* **"GitHub rejected the App ID or private key"**: the App ID does not match the
  private key, or the key was pasted without its `BEGIN` and `END` lines.
  Generate a new private key if you no longer have the file.
* **"The client ID does not match this App"**: copy the **Client ID** again from
  the App's settings page.
* **"Enter the web URL of your GitHub Enterprise"**: enter the address you open
  GitHub at, such as `https://acme.ghe.com`, not an API URL or a repository
  link.
* **"GitHub Enterprise setup not found"**: the setup expired or was replaced.
  Start again from **Integrations**.
* **"Authentication popup was blocked or failed"**: allow popups for Overcut in
  your browser, then select **Save and install** again.
* **Popup stays on "Please wait..." and never closes**: the App's **Callback
  URL** is missing or wrong. Copy it again from the **App settings**.
* **"Missing GitHub authorization code"**: **Request user authorization (OAuth)
  during installation** is not checked on the App. Check it and connect again.
* **Deliveries fail or time out**: the **Webhook URL** or **Webhook secret** on
  the App does not match the **App settings**, or your network blocks
  outbound webhooks to Overcut.
* **Clones or API calls fail**: Overcut cannot reach your GitHub Enterprise.
  Check the [egress range](https://docs.overcut.ai/docs/network-allowlisting.md) is allowed and that the
  certificate is issued by a public certificate authority.
* **Workflows never trigger even though deliveries return 200**: the event is
  not subscribed on the App, or the repository is not registered and
  **Active** in Overcut.

For what agents can do once connected, see the
[GitHub overview](https://docs.overcut.ai/docs/integrations/github).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.