SCM integration

1 minute read

Create an SCM integration to connect your repository. Connect to Bitbucket with an access token, or to GitHub by installing a GitHub App.

To create an SCM integration:

  1. Select an organization, and then select Configurations  Integrations.

  2. Select Create integration.

  3. Select Source code management.

  4. Select one of the following options.

    • For Bitbucket access token:

      1. Enter a Name, an (optional) Description, and your Token.

        Create repository access token
        Figure 1. An example Bitbucket access token with the appropriate permissions.

        The CloudBees platform only requires the following scopes from Bitbucket:

        • Repositories: Read and write

        • Pull requests: Read and write

        • Webhooks: Read and write

      2. (Optional) Select Test integration.

      3. Select Submit.

        Create environment
        Figure 2. Successfully connected Bitbucket integration, with Test integration highlighted.
    • For GitHub App:

      1. (Optional) Enter a Description.

      2. Select Install GitHub App. This action redirects you to GitHub.

      3. Select a GitHub account or GitHub organization to connect.

        You only can set up a single platform integration with a given GitHub account or organization. GitHub accounts and organizations are displayed in GitHub as follows:

        • With a white background (no Configure): Available to connect to the platform.

        • With a light gray background and Configure: At least one repository is already connected to the platform.

        The integration name is automatically generated based on the GitHub organization name.

        Create environment
        Figure 3. GitHub App installation with available GitHub organization highlighted
      4. Install and authorize All repositories, or Only select repositories, and select from the options.

      5. Select Install & Authorize.

The integration is connected and listed in Integrations.