Skip to main content

Connect with GitHub Cloud

GitHub provides hosting for software development and version control using Git.

To integrate SEI with Github, you must choose the type of your Github account.

To integrate with GitHub Enterprise Server, go to Connect with GitHub Enterprise.

PERSONAL AND ORGANIZATION REPOSITORIES

SEI only ingests repositories from organizations. SEI doesn't ingest your personal repos or repos where you are a collaborator but not a member of the affiliated organization.

In other words, the owner of the GitHub personal access token that is associated with the integration must be a direct member of an organization for a repo to be ingested by SEI.

Authenticate with GitHub

To create a GitHub personal access token to configure the SEI GitHub integration.

  1. Log in to your GitHub account and create a Personal Access Token. For instructions, go to the GitHub documentation on Managing your personal access tokens.

  2. Select the following permissions for your personal access token:

    • All repo scopes, including the parent repo scope. The top-level repo scope is required for SEI to have the required visibility into your repos.

    The repo scope selections for a GitHub personal access token.

    • The read:org scope under admin:org.

    The admin scope selections for a GitHub personal access token.

  3. Copy the token somewhere that you can retrieve it when you configure the integration.

  4. If your GitHub organization uses SAML SSO, enable SSO for your personal access token. For instructions, go to the GitHub documentation on Authorizing a personal access token for use with SAML SSO.

info

If you have enabled an allow list in your GitHub account, certain Harness IP addresses must be added to it in order to allow communication between the Harness Platform and GitHub. If the necessary IPs are not whitelisted, the integration may fail to authenticate or sync data properly.

To ensure your integration can work correctly, please refer to the list of Harness Platform IPs that may need to be whitelisted in your firewall.

Add the GitHub integration

For the integration type as Cloud, you can choose how you want to connect GitHub i.e.

  • GitHub App
  • GitHub Access Token i.e. Personal Access Token (classic)

The GitHub App facilitates a seamless connection to GitHub with minimal user intervention, requiring GitHub organization admin configuration for the app.

Using the GitHub App allows you to retrieve all user emails from GitHub, making it faster and easier to connect and manage the integration.

The following permissions are required to configure the Harness SEI Github App integration:

  • Read access to administration, code, commit statuses, issues, metadata, and pull requests: This allows the app to view and access information about your repositories, including code, commits, issues, and metadata.
  • Read access to email addresses: This allows the app to view the email addresses of users who have authorized the app.
Example banner
info

It is important to note that these permissions are requested by the Harness SEI Github App. This means that the app will request these permissions from GitHub on its behalf, and not on behalf of the user who is installing the app.

To set up the integration using the GitHub App:

  1. Select Integrations under Data Settings.
  2. Select Available Integrations, locate the GitHub integration, and select Install.
  3. Select GitHub Cloud as the integration type.

  1. Select the GitHub App tile to set up the connection with GitHub.

  1. Verify that your account is an owner of the GitHub organization that you want to connect. To do this, go to your GitHub organization page and ensure that your account is listed as an owner.

  2. If you've previously connected SEI to GitHub, you may need to remove the SEI app from GitHub before proceeding.

  3. Click the Connect GitHub button to begin authentication.

  4. Once authenticated, you'll be prompted to select the repositories that SEI will monitor. You can choose to monitor all repositories or select specific ones.

    Note that if you select All Repositories, SEI will automatically monitor all existing and future repositories. If you select Only Selected Repositories, SEI will only monitor the repositories you've chosen.

  5. Now on the GitHub App settings page add the basic overview information:

  • Integration Name: Name for your integration.
  • Description (optional): Add a description for the integration.
  • Tags (optional): Add tags for the integration if required.
  1. Once you've configured the settings click on Finalize Integration to save the integration.

See also