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:
-
Select an organization, and then select
. -
Select Create integration.
-
Select Source code management.
-
Select one of the following options.
-
For Bitbucket access token:
-
Enter a Name, an (optional) Description, and your 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
-
-
(Optional) Select Test integration.
-
Select Submit.
Figure 2. Successfully connected Bitbucket integration, with Test integration highlighted.
-
-
For GitHub App:
-
(Optional) Enter a Description.
-
Select Install GitHub App. This action redirects you to GitHub.
-
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.
Figure 3. GitHub App installation with available GitHub organization highlighted -
-
Install and authorize All repositories, or Only select repositories, and select from the options.
-
Select Install & Authorize.
-
-
The integration is connected and listed in Integrations.