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

# GitHub integration

> Connect GitHub for authentication and repository access

Connect your resource to GitHub so users can authenticate with their GitHub account and access private repositories from workspaces.

## Setup methods

There are two ways to configure GitHub integration:

### Easy mode — GitHub App Manifest (recommended)

This creates a GitHub App automatically with the correct permissions.

1. Go to your resource **Settings**
2. Under **External Authentication**, click **Connect with GitHub**
3. Choose your GitHub provider:
   * **github.com** for standard GitHub
   * **GitHub Enterprise** — enter your enterprise URL
4. You'll be redirected to GitHub to authorize the app creation
5. Approve the app and you're redirected back

The integration is configured automatically.

### Advanced mode — manual configuration

If you prefer to configure an existing GitHub OAuth App:

1. Go to your resource **Settings**
2. Under **External Authentication**, switch to **Advanced**
3. Copy the **Callback URL** shown — you'll need this in GitHub
4. In GitHub, create an OAuth App and set the callback URL
5. Back in CodeWire, enter:
   * **Client ID** from your GitHub OAuth App
   * **Client Secret** from your GitHub OAuth App
6. Click **Save**

## After connecting

Once connected, the settings page shows:

* The GitHub provider URL
* A masked Client ID (first 12 characters)
* A **Disconnect** button to remove the integration

<Warning>
  After changing GitHub settings, you must **Sync Configuration** from the Advanced Settings section for changes to take effect on your Coder instance.
</Warning>

<Note>
  This is a per-resource GitHub App integration for Coder authentication. For private repo access during workspace creation, you can also set a GitHub Token in [Organization Secrets](/organizations/secrets) — this is a separate, dashboard-level OAuth connection.
</Note>

## GitHub Enterprise

GitHub Enterprise is supported in both setup modes:

* **Easy mode** — select "GitHub Enterprise" and enter your enterprise URL
* **Advanced mode** — create an OAuth App on your enterprise server and configure manually

## Disconnecting

To remove the GitHub integration:

1. Go to resource **Settings** → **External Authentication**
2. Click **Disconnect**
3. Click **Sync Configuration** from Advanced Settings

Users will no longer be able to sign in via GitHub or access private repositories.
