Skip to main content

setup

Connect to GitHub Enterprise Server

The instructions below will work only for on-prem instances that the Glean Crawler running on GCP can access. Please reach out to Glean Support for any network configuration required.

Step 1. Create a GitHub App

This app will be used by Glean to crawl your GitHub instance.

  1. Go to your GitHub Enterprise Server instance.
  2. Click on any one of your organizations.
  3. Click settings.
  4. Click GitHub Apps.
  5. Click New GitHub App.
  6. Fill the following fields:
    1. Name: Glean
    2. Homepage URL: https://app.glean.com
    3. Identifying and authorizing users
      • User authorization callback URL: Copy the generated URL from the setup page
      • Request user authorization: unchecked
    4. Post installation
      • Leave blank
    5. Webhook
      • Webhook Active: checked
      • Webhook URL: Copy the generated URL from the setup page
      • Webhook secret: sk_test_123456789 %1%
        • Copy the webhook secret into the corresponding field in Glean
        • Copy the webhook secret into the corresponding field in the GitHub App
    6. Repository permissions
      1. Set only the following to read-only:
        • Repository permissions
          • Administration
          • Contents
          • Commit statuses
          • Issues
          • Metadata
          • Pull requests
          • Pages
        • Organization permissions
          • Members
        • User permissions (or Account Permissions)
          • Email addresses
    7. Subscribe to events
      • Check only the following:
        • Commit comment
        • Issues
        • Issue comment
        • Member
        • Organization
        • Pull request
        • Pull request review
        • Pull request review comment
        • Push
        • Repository
        • Team
        • Team add
    8. Where can this App be installed: Any account

Step 2. Configure the GitHub App

Copy the following values into the corresponding fields in Glean:

  • App ID
  • Client ID
  • Client Secret At the very bottom of the page, click "Generate a private key" It will download the key to your local machine. Upload this file into the corresponding field in Glean.

Step 3. Install the GitHub App

Click on Install App from the menu on the left. Click Install for all organizations you want to connect.

Step 4. Create an admin token

  1. Go to your GitHub Enterprise Server instance.
  2. Click on the User Profile dropdown on the top right.
  3. Click on User settings.
  4. Click on Developer settings.
  5. Click on Personal access tokens.
  6. Click on Tokens (classic)
  7. Generate a new classic token with no expiration with the following permissions:
    • user:email
    • read:enterprise
    • read:org
  8. Copy the token into the Admin Personal Access Token field in Glean.

Step 5. Configure additional configs on Admin Console

Enter the following configs in Glean:

  1. Git Domain