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

# GitHub Enterprise

Gitpod works with public, private, or internal repositories on your own instance of [GitHub Enterprise](https://docs.github.com/en/enterprise-server@3.15/get-started/onboarding/getting-started-with-github-enterprise-server) (GHE). Setting this up requires 2 steps.

1. A one-time registration of the GHE server with Gitpod.
2. Each Gitpod user connects their account to GHE the first time they start a workspace.

## Registering a GitHub Enterprise Server

The GHE Admin can register the GHE server in their own Gitpod [account settings](https://gitpod.io/integrations).

Start by creating a **New Integration** and entering the **Provider Host Name** of GHE server.

<Frame caption="Gitpod New Git Integration form">
  <img src="https://mintcdn.com/gitpod-13c83c2b/e8LRoo3UknjjGZet/images/integrations/new-git-integration-form.png?fit=max&auto=format&n=e8LRoo3UknjjGZet&q=85&s=6317b25fdd9e06d590247698438de395" width="850" height="531" data-path="images/integrations/new-git-integration-form.png" />
</Frame>

Copy the **Redirect URL** from the form above.

Create a new OAuth application in your GHE developer settings, and fill in the **Authorization callback URL** with the copied value.

<Frame caption="GitHub Enterprise register new OAuth application form">
  <img src="https://mintcdn.com/gitpod-13c83c2b/e8LRoo3UknjjGZet/images/integrations/github-new-oauth-application.png?fit=max&auto=format&n=e8LRoo3UknjjGZet&q=85&s=8aa31163d31fb6887f8e85e53e354c45" width="850" height="720" data-path="images/integrations/github-new-oauth-application.png" />
</Frame>

Populate the remaining fields and register the application in GHE. This opens a settings page where you can copy the OAuth **Client ID** and a **Client Secret**.

<Frame caption="GitHub Enterprise new OAuth client ID and secret">
  <img src="https://mintcdn.com/gitpod-13c83c2b/e8LRoo3UknjjGZet/images/integrations/github-oauth-client-id-and-secret.png?fit=max&auto=format&n=e8LRoo3UknjjGZet&q=85&s=e183c91e740b2956c62a36ae2487526d" width="850" height="676" data-path="images/integrations/github-oauth-client-id-and-secret.png" />
</Frame>

Copy the **Client ID** and **Secret** into the corresponding fields in Gitpod and activate the integration.

## Connecting Gitpod accounts to GHE

GHE users connect their Gitpod account to their GHE account by starting a workspace.

To start a workspace, paste the URL of a GHE repository into the New Workspace popup (`Ctrl/Cmd + O`) in Gitpod, or prefix the repository URL as described in [Getting started](/classic/user/introduction/getting-started/overview).

The first time you do this, you will be prompted to authorize with your GHE instance.

<Frame caption="Prompt to authorize with GitHub Enterprise">
  <img src="https://mintcdn.com/gitpod-13c83c2b/e8LRoo3UknjjGZet/images/integrations/github-enterprise-auth-prompt.webp?fit=max&auto=format&n=e8LRoo3UknjjGZet&q=85&s=8a946746680c7e6d126c5c79b07d1a0c" width="1336" height="1164" data-path="images/integrations/github-enterprise-auth-prompt.webp" />
</Frame>

The GHE OAuth window will appear, showing the name of the registered Gitpod OAuth app.

<Frame caption="OAuth confirmation from GitHub Enterprise">
  <img src="https://mintcdn.com/gitpod-13c83c2b/e8LRoo3UknjjGZet/images/integrations/github-enterprise-oauth-popup.png?fit=max&auto=format&n=e8LRoo3UknjjGZet&q=85&s=350b3419d9252bcfdb773a38038861c8" width="850" height="490" data-path="images/integrations/github-enterprise-oauth-popup.png" />
</Frame>

If you are trying to open a private or internal repository in GHE, you will be prompted to grant additional authorization before the workspace starts.

<Frame caption="Private repo OAuth authorization from GitHub Enterprise">
  <img src="https://mintcdn.com/gitpod-13c83c2b/e8LRoo3UknjjGZet/images/integrations/github-enterprise-private-repo-scope-authorization.webp?fit=max&auto=format&n=e8LRoo3UknjjGZet&q=85&s=9fa0e2e518715d86851f469941547bb5" width="1752" height="1200" data-path="images/integrations/github-enterprise-private-repo-scope-authorization.webp" />
</Frame>

## Validating your GHE connection with Gitpod

You should see the connection to your GHE instance, with your GHE account ID, in your Gitpod [integration settings](https://gitpod.io/integrations)

<Frame caption="GitHub Enterprise connection in Gitpod integration settings">
  <img src="https://mintcdn.com/gitpod-13c83c2b/e8LRoo3UknjjGZet/images/integrations/github-enterprise-connection.png?fit=max&auto=format&n=e8LRoo3UknjjGZet&q=85&s=5198c3b6769638536f5efe37d11994e2" width="850" height="406" data-path="images/integrations/github-enterprise-connection.png" />
</Frame>

If necessary, you can modify your GHE OAuth permissions to allow private repository access using the context menu on the right.

<Frame caption="Gitpod settings for GitHub integration permissions">
  <img src="https://mintcdn.com/gitpod-13c83c2b/e8LRoo3UknjjGZet/images/integrations/github-oauth-scopes.webp?fit=max&auto=format&n=e8LRoo3UknjjGZet&q=85&s=8a068feef5ea7087454a98185e98cc15" width="1122" height="1206" data-path="images/integrations/github-oauth-scopes.webp" />
</Frame>
