> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/software-engineering-insights/use-software-engineering-insights/setup-sei/configure-integrations/bitbucket/index.md).

# Bitbucket

Bitbucket Cloud is a cloud-based platform for managing Git repositories. It's part of the Atlassian suite and is widely used for version control, collaboration, and DevOps workflows.

This page describes the settings and permissions for the Bitbucket integration. Harness supports both [Cloud](/software-engineering-insights/use-software-engineering-insights/setup-sei/configure-integrations/bitbucket/sei-bitbucket-cloud.md) and [Data Center (On-Prem)](/software-engineering-insights/use-software-engineering-insights/setup-sei/configure-integrations/bitbucket/sei-integration-bitbucket.md) versions of Bitbucket. The following settings are applicable to Bitbucket Cloud.

#### Requirements <a href="#requirements" id="requirements"></a>

The following permissions and settings are required to use the SEI Bitbucket integration:

* You have a Bitbucket account.
* Your role is **Member** or higher.

{% hint style="info" %}
If you have enabled an allowlist in your Bitbucket account, certain Harness IP addresses must be added to it in order to allow communication between the Harness Platform and Bitbucket. If the necessary IPs are not whitelisted, the integration may fail to authenticate or sync data properly.

To ensure your integration can work correctly, refer to the list of [Harness Platform IPs](/harness-ai/use-harness-platform/references/allowlist-harness-domains-and-ips.md) that may need to be whitelisted in your firewall.
{% endhint %}

#### Add the integration <a href="#add-the-integration" id="add-the-integration"></a>

1. In your **Harness Project**, select the **SEI Module**, and go to your **Account**.
2. Select **Integrations** under **Data Settings**.
3. Select **Available Integrations**, and locate the **Bitbucket integration**, and select **Install**.
4. Select the type of your Bitbucket account as Cloud.
5. Choose the authentication type for the integration. You can either use **OAuth** or **App Passwords** to set up the authentication with the Bitbucket platform.

{% tabs %}
{% tab title="Using OAuth" %}
6\) Click **Using OAuth** to log in directly to Bitbucket and grant access permissions without sharing tokens or passwords. Bitbucket will confirm authorization, returning you to the integration setup page.

* Enter a **Name** for the integration.
* Optionally, add a **Description** and **Tags**.
* Click **Save** to save the integration.
  {% endtab %}

{% tab title="Using App Password" %}
{% hint style="info" %}
**APP PASSWORDS**

For organizations that have [deprecated App Passwords](https://www.atlassian.com/blog/bitbucket/bitbucket-cloud-enters-phase-2-of-app-password-deprecation), see the **Using OAuth** tab to connect Bitbucket Cloud.
{% endhint %}

If your Bitbucket account is tied to a Google login or uses two-factor authentication, you'll need to set up an App Password instead of OAuth.

**Steps to Generate an App Password in Bitbucket**

1. Sign in to **Bitbucket Cloud** and log in to your account.
2. Navigate to **Account Settings**:
   * Click on your profile picture in the bottom left corner.
   * Select **Personal settings**.
   * In the left-hand menu, click **App passwords** under the **Access management** section.
   * Click the **Create app password** button.
3. Configure **App Password**:
   * Enter a label for your new app password. This helps you remember what it's used for.
   * Select the following permissions required.
4. Copy the generated app password and save it securely. (Note that you won't be able to see it again.)

**Steps to Complete the Integration Setup in Harness**

In Harness, go to your integration configuration and click on **Next**.

1. Enter a **Name** for the integration.
2. The **Description** and **Tags** are optional.
3. Provide the **Username** and **Password (App Password)** you generated in Bitbucket.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>To avoid rate limiting issues, consider setting up multiple Account Credentials to distribute requests.</p></div>
4. Click **Validate Connection** to run pre-flight checks and confirm the connection. Once validated, your Bitbucket integration will appear under **Your Integrations**.
   {% endtab %}
   {% endtabs %}

#### See also <a href="#see-also" id="see-also"></a>

* [Connect with Bitbucket Data Center](/software-engineering-insights/use-software-engineering-insights/setup-sei/configure-integrations/bitbucket/sei-integration-bitbucket.md)
* [Reauthenticate](/software-engineering-insights/use-software-engineering-insights/setup-sei/configure-integrations/reauthenticate-integration.md)
* [Ingested data](/software-engineering-insights/use-software-engineering-insights/setup-sei/configure-integrations/bitbucket/sei-bitbucket-datasheet.md)
