# GitHub Enterprise Server (on-prem) — Issue Tracking API: connection

> Canonical URL: https://developers.apideck.com/apis/issue-tracking/github-server/connection

# How to Connect to GitHub Enterprise Server (On-Premise)

This guide will help you connect your self-hosted GitHub Enterprise Server instance to Apideck's Unified API. Through this integration, you can programmatically access your repositories, issues, comments, labels, and assignees.

## Prerequisites

Before you begin, make sure you have:

- Access to your GitHub Enterprise Server instance (e.g. `https://github.mycompany.com`)
- A GitHub user account with appropriate permissions on the organization you want to connect
- The ability to create a Personal Access Token on that instance

## Configuration Settings

To connect your GitHub Enterprise Server instance to Apideck, you'll need to provide three pieces of information:

1. **Server Base URL**: the URL where your GitHub Enterprise Server instance is hosted
2. **Personal Access Token (PAT)**: an API token for authentication
3. **Organization**: the login (slug) of the organization you want to access

## Step 1: Find Your Server Base URL

The Server Base URL is the URL via which users access your GitHub Enterprise Server. This is typically the same URL you use to log into GitHub in your web browser.

1. **Open your GitHub Enterprise Server instance** in a web browser
2. **Copy the base URL**, for example: `https://github.mycompany.com`

**Important notes:**

- The Vault field already shows the `https://` prefix: enter just the host (e.g. `github.mycompany.com`), without the scheme
- Do not include any path after the domain (e.g. `/login`)
- Apideck will append `/api/v3` automatically when calling the REST API
- Make sure your instance has a valid SSL/TLS certificate

## Step 2: Create a Personal Access Token (PAT)

1. **Log in to your GitHub Enterprise Server instance** with your user account
2. **Click your profile picture** in the top-right corner and select **Settings**
3. In the left sidebar, scroll to **Developer settings**
4. Click **Personal access tokens** → **Tokens (classic)**
5. Click **Generate new token (classic)**
6. **Enter a token name** (e.g. "Apideck Integration") and an expiration date
7. **Select the required scopes:**
   - `repo`: full control of private repositories (required to read issues and labels)
   - `read:org`: read organization data (recommended)
8. Click **Generate token**
9. **Copy the token value** that appears on the screen. GitHub will display the token **only once**. Copy it immediately and store it securely.

## Step 3: Find Your Organization Login

The Organization login is the slug used in URLs (not the display name). You can find it in the URL of your organization page:

- `https://github.mycompany.com/<organization>`: enter **only** `<organization>` (for example, `apideck-organization`), **not** the full URL.

> If you accidentally paste the full URL of your organization page, Apideck automatically extracts just the organization slug from it.

## Step 4: Configure in Apideck Vault

1. **Navigate to the Apideck Vault** and find the GitHub Enterprise Server connector
2. **Enter the following settings:**
   - **Server Base Url**: the host of your GitHub Enterprise Server; the field shows the `https://` prefix, so enter just the host (e.g. `github.mycompany.com`)
   - **Personal Access Token (PAT)**: the token you created in Step 2
   - **Organization**: the organization login you found in Step 3
3. Click **Save settings** to save your configuration and establish the connection

## Troubleshooting

### Error: Authentication Failed

- Verify that your Personal Access Token is correct and hasn't expired
- Ensure the token has the `repo` scope enabled
- Check that the token hasn't been revoked
- Try creating a new token if the issue persists

### Error: Organization Not Found

- Verify that the Organization login matches the slug in your GitHub URL (case-insensitive)
- Ensure your PAT user is a member of the organization

### Error: Connection Timeout

- Verify that your GitHub Enterprise Server is accessible from the network where Apideck is running
- Check firewall rules to ensure API access is allowed


[API reference](https://developers.apideck.com/apis/issue-tracking/reference.md) · [Coverage matrix](https://developers.apideck.com/apis/issue-tracking/coverage)
