Skip to main content

Set up GitHub Cloud

This guide covers connecting GitHub Cloud to Glean. There are two setup paths, and the one you use depends on how your GitHub account is organized. For self-hosted deployments, see GitHub Enterprise Server or GitHub Server instead.

Your GitHub deploymentSetup path
One or more organizations on github.comGitHub Cloud. You install the Glean GitHub App and enter your organization name.
An enterprise account on github.com, or GitHub Enterprise Cloud with Data Residency on <your-enterprise>.ghe.comGitHub Enterprise Cloud. You create a custom GitHub App on your enterprise account and enter your enterprise slug and domain.
Disclaimer

The instructions below are updated periodically. For the latest steps, refer to the Glean Admin console.

Availability

The GitHub Enterprise Cloud setup path is enabled by Glean on request rather than being self-serve. Contact Glean Support to have it turned on for your deployment.

Required access

RequirementGitHub CloudGitHub Enterprise Cloud
Role that runs setupOrganization adminGitHub enterprise owner
GitHub AppThe Glean GitHub App, which you install from GitHubA custom GitHub App that you create on your enterprise account
Ongoing accessAdmin read-only, for the running and operation of the GitHub AppAdmin read-only, for the running and operation of the GitHub App
Enterprise Managed UsersNot requiredRequired
Private repositoriesIndividual user authorization (per-user OAuth)Individual user authorization (per-user OAuth)

On the GitHub Cloud path, the App's permission scopes are fixed and read-only, and organization admins cannot change them. On the GitHub Enterprise Cloud path, you set the same read-only scopes yourself when you create the App. See API endpoints and permissions for the full list.

Set up the connector

Install the Glean GitHub App

  1. Before installing, make sure your GitHub account has a verified work email address. Go to GitHub → Settings → Emails and confirm that your work email is listed and labeled as Verified. Glean uses this email to map the installation to your organization, so a missing or unverified email will cause the setup to fail.

  2. Go to https://github.com/apps/glean-github-app, or in Glean go to Admin console → Connectors → GitHub and select Install the Glean GitHub App.

  3. Select Install or Configure.

  4. Select the organization where the app should be installed.

  5. Choose which repositories the app can access:

    • All repositories grants access to every repository in the organization.
    • Only select repositories limits access to the repositories you choose.

    Select Install & Authorize. Glean indexes only the repositories granted to the GitHub App installation. You can change this selection later from the app's installation settings in GitHub. Use crawling restrictions to further control which repositories within that set are indexed.

Configure the connector in Glean

After installing the Glean GitHub App, wait a few minutes for the installation to propagate before continuing.

  1. Enter the connector name in the Name text box.
  2. Choose an icon for the connector.
  3. Enter your GitHub organization name in the GitHub organization name text box.
  4. Select Save.

Enable per-user OAuth for private repositories

The GitHub App crawls content, but GitHub returns a user's email address only after that user has authorized Glean. Each user must authorize once so their GitHub identity can be matched to their Glean identity. Until they do, they cannot see private repositories they have access to.

Each user authorizes from Glean → Settings → Connectors → GitHub by selecting Authorize. After a user authorizes, Glean picks up the change on the next identity crawl and syncs the private repositories and aliases they have access to.

Manage crawl behavior

After setup, you can configure what content Glean crawls from the Manage Data tab in the admin console (Admin console → Connectors → GitHub → Manage Data). Options include:

  • Repository inclusion and exclusion lists
  • GitHub Pages repository inclusion and exclusion lists
  • Content type toggles for wikis, issues, and pull request diffs
  • Code file extension controls

For full details, see Crawling restrictions.

See also