Integrate a Bitbucket Repository (Self-hosted)
Steps for Integrating a Bitbucket Repository (Self-hosted) to a Project
Important: To connect a project to a Bitbucket self-hosted repository, you must add the integration IPs for Polaris to your allow list. See Integrations for more information.
- From Application, select a Project and navigate to Settings > Integrations.
- Select Self-hosted.
- Select the source of your repository: Bitbucket.
- Enter the Repository URL. To obtain the repository's URL, open your Bitbucket project, click the Clone button, and copy the HTTPS URL (SSH is not supported) starting at
https
.
- Enter the Repository Access Token.
Generate an access token in Bitbucket then paste it into the text field.
- Login to Bitbucket Data Center.
- Select the profile icon (near the upper-right corner of the screen) and open Manage account.
- On the left tab, click on HTTP access tokens and click the create token button.
- Name your token and enable Project read permissions under Project Permissions and Repository read under Repository Permissions.
- Set expiry based on preferences and create the token. Copy it into the Repository Access Token field in Polaris.
- Click Test your Connection. A spinning circle indicates the test is in progress.
-
If your connection test is unsuccessful, check the following and retry:
- Your network connection is stable.
- Check the Repository URL and Access Token to make sure they are accurate.
- Check that Polaris external IP addresses has been added to your Firewall allow list.
- Check that you selected the correct provider and type of server for your source repository.
- If your connection is successful, click Save.
You can then scan on demand (see How to test from the web UI) or schedule automatic testing on a daily or weekly basis (see Test scheduling policies).
Note: From the Tests screen, before beginning a test manually, make sure to test the connection.