Configuring Bitbucket Access
If Bitbucket is already set up on your runner, skip to Authorizing Bitbucket Access.Ona Cloud
Ona Cloud provides built-in Bitbucket Cloud integration with no configuration required. Authorize access to Bitbucket when creating your first environment.Self-Hosted Runners
For self-hosted runners (like AWS), Bitbucket integration is configured during runner creation or in the runner settings. We are currently supporting OAuth for authorizing Bitbucket access. Support for Personal Access Tokens (PATs) is planned.Using OAuth
- Go to Settings → Runners and select the runner you want to configure.
- In the Configure repository access section, click Select next to Bitbucket. If other providers are already configured, click Add a new provider first.
- Toggle Enable OAuth.
- Follow the instructions in Bitbucket’s docs to create an OAuth app.
- The app name can be any name you like
- You can get the callback URL from the configuration dialog
- Select the required scopes:
- account so that the git author name and email can be set in the environment
- repository so that the repository can be cloned and the context URL can be parsed
- repository:write so that changes can be pushed from the environment
- pullrequest so that an environment can be started from a pull request
- Enter the Client ID and Client Secret from the OAuth app. Bitbucket calls these Key and Secret. The client secret is encrypted with the runner’s public key, so only the runner can read it.
- Click Save & Test.
Authorizing Bitbucket Access
Using OAuth
-
When creating your first environment, you will be asked to authorize the new application. To use OAuth press the Connect button. A new window will open that directs you to Bitbucket to authorize the OAuth app. The requested scopes are account, repository, repository:write, and pullrequest.
- The account scope is required so that the git author name and email can be set in the environment
- The repository scope is required so that the repository can be cloned and the context URL can be parsed
- The repository:write scope is required so that changes can be pushed from the environment
- The pullrequest scope is required so that an environment can be started from a pull request
- After you have authorized, you can close the window. After a few seconds you should get a confirmation that Bitbucket is now connected.