Integrate a Bitbucket Repository (Self-hosted)

How to integrating a single Bitbucket repository to a project.

Steps for Integrating a Bitbucket Repository (Self-hosted) to a Project

This allows you to select the repository when creating a new test for the project (see How to test from the web UI). Only one repository can be used per 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.
  1. From Application, select a Project and navigate to Settings > Integrations.
  2. Select Self-hosted.
  3. Select the source of your repository: Bitbucket.
  4. 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.


  5. Enter the Repository Access Token.

    Generate an access token in Bitbucket then paste it into the text field.

    1. Login to Bitbucket Data Center.

    2. Select the profile icon (near the upper-right corner of the screen) and open Manage account.

    3. On the left tab, click on HTTP access tokens and click the create token button.

    4. Name your token and enable Project read permissions under Project Permissions and Repository read under Repository Permissions.

    5. Set expiry based on preferences and create the token. Copy it into the Repository Access Token field in Polaris.

  6. Click Test your Connection. A spinning circle indicates the test is in progress.
  7. If your connection test is unsuccessful, check the following and retry:
    1. Your network connection is stable.
    2. Check the Repository URL and Access Token to make sure they are accurate.
    3. Check that Polaris external IP addresses has been added to your Firewall allow list.
    4. Check that you selected the correct provider and type of server for your source repository.
  8. 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.