> ## Documentation Index
> Fetch the complete documentation index at: https://support.lilt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# BitBucket

> This guide provides step-by-step instructions for configuring and utilizing the BitBucket Server connector with minimal configurations for ensuring a successful round trip.

## Overview

Once all configuration parameters are set, the connector will be able to:

* Clone the source branch from your repository
* Process files for translation
* Push translated files to the delivery branch
* Create pull requests with the specified template

## Configuration

1. Configure Bitbucket Host.

   **Parameter:** Bitbucket Host

   **Description:** The base URL of your BitBucket Server instance. This is typically unique for each client.

   **Examples:**

   * Testing environment: `http://34.72.91.92:7990`
   * Customer environment: `https://salesforce.bitbucket.com/`
2. Set Bitbucket project key.

   **Parameter:** Bitbucket Project Key

   **Description:** The project key required for API requests.

   **How to obtain:**

   * Navigate to **Projects** in BitBucket Server.

     <img src="https://mintcdn.com/lilt-db26f913/hgFsGbktMvG8e1e8/images/proj_1.png?fit=max&auto=format&n=hgFsGbktMvG8e1e8&q=85&s=aea2cb64b271702a0ad744c94cd8a82d" alt="Proj 1 Pn" title="Proj 1 Pn" style={{ width:"80%" }} width="1918" height="939" data-path="images/proj_1.png" />
   * Select the project containing your repository
   * Go to **Project Settings**.

     <img src="https://mintcdn.com/lilt-db26f913/hgFsGbktMvG8e1e8/images/proj_2.png?fit=max&auto=format&n=hgFsGbktMvG8e1e8&q=85&s=f2d96a9bf48a208e08175b8a9c20a543" alt="Proj 2 Pn" title="Proj 2 Pn" style={{ width:"80%" }} width="1918" height="939" data-path="images/proj_2.png" />
   * On the **Project Details** page, locate the **Project Key**.

     <img src="https://mintcdn.com/lilt-db26f913/hgFsGbktMvG8e1e8/images/proj_3.png?fit=max&auto=format&n=hgFsGbktMvG8e1e8&q=85&s=c0a853cb4a02d383108ffbc2cc7e28d9" alt="Proj 3 Pn" width="1918" height="939" data-path="images/proj_3.png" />
   * Copy the key and paste it into the connector configuration
3. Configure repository name.

   **Parameter:** Bitbucket Repository Name

   **Description:** The name of the repository to connect to.

   **How to obtain:**

   * Navigate to your target repository.

     <img src="https://mintcdn.com/lilt-db26f913/a3Mk_Q36s4Ku-LT-/images/repo_1.png?fit=max&auto=format&n=a3Mk_Q36s4Ku-LT-&q=85&s=c99228358790163494df48753e8092d6" alt="Repo 1 Pn" title="Repo 1 Pn" style={{ width:"76%" }} width="1918" height="939" data-path="images/repo_1.png" />
   * Go to **Settings**.

     <img src="https://mintcdn.com/lilt-db26f913/a3Mk_Q36s4Ku-LT-/images/repo_2.png?fit=max&auto=format&n=a3Mk_Q36s4Ku-LT-&q=85&s=0b0468f4e64b3103b8e7f5fdb461265c" alt="Repo 2 Pn" width="1918" height="939" data-path="images/repo_2.png" />
   * On the **Repository Details** page, find the repository name (test-qa).
   * Copy and paste it into the connector configuration.
4. Set Git Repo URL.

   **Parameter:** Git Repo URL

   **Description:** The full repository URL used for Git operations.

   **How to obtain:**

   * Navigate to your target repository.

     <img src="https://mintcdn.com/lilt-db26f913/a3Mk_Q36s4Ku-LT-/images/repo_1(1).png?fit=max&auto=format&n=a3Mk_Q36s4Ku-LT-&q=85&s=d5e748d2f419e2a539eff7e6c454284c" alt="Repo 1(1) Pn" width="1918" height="939" data-path="images/repo_1(1).png" />
   * Go to **Settings**.

     <img src="https://mintcdn.com/lilt-db26f913/a3Mk_Q36s4Ku-LT-/images/repo_2(1).png?fit=max&auto=format&n=a3Mk_Q36s4Ku-LT-&q=85&s=c44ab7983f28358d092e0fbf64feaddf" alt="Repo 2(1) Pn" width="1918" height="939" data-path="images/repo_2(1).png" />
   * On the **Repository Details** page, locate the repository URL.

     <img src="https://mintcdn.com/lilt-db26f913/a3Mk_Q36s4Ku-LT-/images/repo_url_2.png?fit=max&auto=format&n=a3Mk_Q36s4Ku-LT-&q=85&s=ddbc9c7c9b0e5c71c3ef95d4b4a9831c" alt="Repo Url 2 Pn" width="1918" height="939" data-path="images/repo_url_2.png" />
   * Copy the URL and paste it into the connector configuration.
5. There are two ways to use this connector. We outline both below. Bitbucket\_Server will have a dynamic source branch selection enabled but also inherits the regular Git connector single source branch.
   1. Single source branch flow
   2. Dynamic source branch flow
6. Generate Bitbucket API token.

   **Parameter:** Bitbucket API Token

   **Description:** A user-specific access token used by the connector to create pull requests via the BitBucket API.

   **How to generate:**

   * Navigate to **Manage Account** (User Settings).

     <img src="https://mintcdn.com/lilt-db26f913/ay3nRpQfsmzQryGU/images/api_1.png?fit=max&auto=format&n=ay3nRpQfsmzQryGU&q=85&s=5a3bb4869921eee3825c86e2b78a94f4" alt="Api 1 Pn" width="1918" height="939" data-path="images/api_1.png" />
   * Select **HTTP Access Tokens**.

     <img src="https://mintcdn.com/lilt-db26f913/ay3nRpQfsmzQryGU/images/api_2.png?fit=max&auto=format&n=ay3nRpQfsmzQryGU&q=85&s=3aa8674ad67d5d5e6e5deacc68b7d998" alt="Api 2 Pn" width="1918" height="939" data-path="images/api_2.png" />
   * Click **Generate Token**.

     <img src="https://mintcdn.com/lilt-db26f913/ay3nRpQfsmzQryGU/images/api_3.png?fit=max&auto=format&n=ay3nRpQfsmzQryGU&q=85&s=7b65872a070b2e1b1f48dd4844b61278" alt="Api 3 Pn" width="1918" height="939" data-path="images/api_3.png" />
   * Grant **Read** and **Write** permissions.
   * Copy the token immediately (it can only be copied once).
   * Save the token in the connector configuration.

   ***Important:*** This token is associated with a specific user account. When a pull requests is created, it points to the account for which the token is generated. It MUST NOT be a Bitbucket GIT Token.
7. Set Bitbucket account user.

   **Parameter:** Bitbucket Account User

   **Description:** The username of the BitBucket account for which the API token was generated (from Step 7).
8. Generate Bitbucket GIT token.

   **Parameter:** Bitbucket GIT Token

   **Description:** An HTTP access token used specifically for cloning and pushing to the repository via Git.

   **How to generate:**

   * Navigate to your target repository.

     <img src="https://mintcdn.com/lilt-db26f913/a3Mk_Q36s4Ku-LT-/images/repo_1(2).png?fit=max&auto=format&n=a3Mk_Q36s4Ku-LT-&q=85&s=b58bfbc89c0e87b32f4085aed2008a65" alt="Repo 1(2) Pn" width="1918" height="939" data-path="images/repo_1(2).png" />
   * Go to **Settings**.

     <img src="https://mintcdn.com/lilt-db26f913/a3Mk_Q36s4Ku-LT-/images/repo_2(2).png?fit=max&auto=format&n=a3Mk_Q36s4Ku-LT-&q=85&s=d591755ac7efadc8ba87dbc183041992" alt="Repo 2(2) Pn" width="1918" height="939" data-path="images/repo_2(2).png" />
   * Select **HTTP Access Tokens**.

     <img src="https://mintcdn.com/lilt-db26f913/a3Mk_Q36s4Ku-LT-/images/repo_2(3).png?fit=max&auto=format&n=a3Mk_Q36s4Ku-LT-&q=85&s=370f5fa1d7455123bd64db68b1ace95c" alt="Repo 2(3) Pn" width="1918" height="939" data-path="images/repo_2(3).png" />
   * Click **Generate Token**.

     <img src="https://mintcdn.com/lilt-db26f913/a3Mk_Q36s4Ku-LT-/images/repo_4.png?fit=max&auto=format&n=a3Mk_Q36s4Ku-LT-&q=85&s=e688ad11e0b45d81dfbd41b30ce45f4e" alt="Repo 4 Pn" width="1918" height="939" data-path="images/repo_4.png" />
   * Grant **Read** and **Write** permissions.
   * Copy the token immediately (it can only be copied once).
   * Save the token in the connector configuration.

   **Note:** This is separate from the API token and is used for Git operations ONLY. Do not use it for BitBucket API Token configuration.
9. Configure pull request template

   **Parameter:** Bitbucket Pull Request Template

   **Description:** The title template used for pull requests created by the connector.

   **Example:** `[Translation] {language} - {date}`, `Update translations for {target_locale}`

## Configuration example

```
{
  "project_prefix": "[QA] BitBucket Server v1",
  "target_memories": {
    "de-DE": {
      "id": 14384
    }
  },
  "lilt_api_key": "redacted",
  "fs_export_path_map": {},
  "git_delivery_branch_template": "wwtest-new-branch-newwww",
  "git_repo_url": "http://34.72.91.92:7990/scm/test/test-qa.git",
  "git_source_branch": "main",
  "bitbucket_access_token": "BBDC-NTAxMzI0NjkxMDE0Oq9H+QWjb8zFB0redacted",
  "bitbucket_pr_template": "test-template",
  "bitbucket_project_key": "TEST",
  "bitbucket_repo_git_token": "BBDC-MjIxNzQzMDk0OTI4Oo2Ji8Q+n8014redacted",
  "bitbucket_repo_name": "test-qa",
  "bitbucket_username": "victor.danila",
  "bitbucket_host": "http://34.72.91.92:7990",
  "lilt_translation_workflow": "MT"
}
```
