> For the complete documentation index, see [llms.txt](https://docs.opsmx.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.opsmx.com/integrations/integrating-ci-and-cd-tools/bitbucket-server.md).

# Bitbucket Server

Bitbucket Server is a self-hosted (on-premises) version of Atlassian's Bitbucket, used for Git repository management, code collaboration, and version control within an organization's own infrastructure.

**Usage of BitBucket Server in Delivery Shield**

* Delivery Shield integrates with self-hosted Bitbucket Server instances to pull repository and pipeline data for source code scanning within your own infrastructure.
* Enables SCM scanning, secrets detection, and Git security posture evaluation for on-premises repositories, feeding results into the application's overall security score.

**To Integrate BitBucket Server:**

1. Navigate to **Setup** > **Integrations**.
2. In the **Source** panel, click **BitBucket Server**.
3. The BitBucket Server integration page is displayed. Click **+New Account**.

<figure><img src="https://files.catbox.moe/kfmuvk.png" alt=""><figcaption></figcaption></figure>

4. In the popup that appears, enter the following details:

<figure><img src="https://files.catbox.moe/90e2pj.png" alt=""><figcaption></figcaption></figure>

5. Enter the **Account Name, API URL, Access Level, Project key, Auth Type, Username** and **Token** values of your BitBucket Server account.
6. Select the **Teams** and the corresponding **Environments** from the dropdown for which you want the integration to be available. The integration will be available for the selected teams and environment only.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>You can select up to 5 teams for the integration to be displayed.</p></div>

   * An example is given below for reference:

   <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeuMZQzZsZQuulVdW9B9OuffNPoEXqbcpcAkYtKVyb7YiTQxbVIt1L4Gh-zshqX2J9MFKIat8x4oWFIGxdg3j1XVagyUNhUAlD_52soyMyd1cy53p6XiYi0LsTjIBfHcybRWl61?key=D9EXoOdGF7oYOBvYaW2GnRWJ" alt=""><figcaption></figcaption></figure>

   * In the example above,
     * if **Team 1**, **Team 2**, and **Team 3** are selected, only applications associated with these teams can access the integration. Any applications belonging to other teams, such as **Team 4**, will not have access to this account.
     * Even if the user who created this account is also an admin for **Team 4**, the integration account remains restricted and is not available for **Team 4**.
     * Access to the account is strictly limited to the specified **Teams** and **Environments** selected during account creation.
   * **For Organization Admins:**
     * When an **Organization Admin** creates an account without selecting specific **Teams** and **Environments**, the account will be universally applicable, granting access to **all teams** and **all environments** by default.
   * **For Team Admins with Multiple Teams:**<br>
     * If a **Team Admin** who manages multiple teams creates an account without specifying particular **Teams** and **Environments**, the account will only be accessible to the teams for which the logged-in user holds admin privileges.
7. Click **Save**. The tool is integrated in the source stage.
8. Once the integration is successful, a success popup message appears at the top right corner of the page. The BitBucket Server integrator is connected and account is listed under BitBucket Server integrator.

**To Edit the Values**

1. You can edit the entered values by clicking the **Edit** option.

<figure><img src="https://files.catbox.moe/o3jyb9.png" alt=""><figcaption></figcaption></figure>

2. Enter the new URL and token value and click **Update**.

<figure><img src="https://files.catbox.moe/q0a7tu.png" alt=""><figcaption></figcaption></figure>

The new values get updated.
