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

# Install Qodo v1.x on Bitbucket - Multi-tenant

> Qodo v1.x installation guide for multi-tenant on Bitbucket Cloud.

<Warning>
  **Git Integration (formerly Qodo Merge)** – AI code review agents for pull requests. This documentation describes the Qodo v1 experience. For the Qodo v2 documentation, click [here.](/code-review)
</Warning>

Learn more on how to setup Qodo on Bitbucket.

## Before you start

Integrating Qodo with Bitbucket is a simple process that can be applied to one repository or scaled to multiple workspaces.

Setup usually takes a few minutes, including authentication and pipeline configuration.

Once connected, Qodo will process your pull requests automatically and provide reviews, summaries, or improvement suggestions as part of your Bitbucket workflow.

## 1. Log in to Qodo portal

Before setting up Qodo, make sure to [create a Qodo account and sign in](https://app.qodo.ai/signin).

Once you've signed in to the Qodo portal, you can follow the [Qodo Merge installation guide](https://app.qodo.ai/qodo-merge/installation) straight from the portal, or continue reading here.

## 2. Set up Qodo

Once you've signed in to your [Qodo account](https://app.qodo.ai/qodo-merge/installation) or below to setup Qodo on Bitbucket.

### Bitbucket App

<Note>
  **This installation method is available to subscribed users only.**

  Visit [Qodo's Plans page](https://www.qodo.ai/pricing/) to learn more.
</Note>

<Steps>
  <Step>
    Go to Go to the [Qodo Git plugin Pro app page](https://bitbucket.org/site/addons/authorize?addon_key=d6df813252c37258).
  </Step>

  <Step>
    Select which workspace Qodo should have access to, then click **Grant access**.
  </Step>
</Steps>

### Bitbucket Server

<Note>
  [**Contact Qodo**](https://www.qodo.ai/contact/#pricing) **to use Qodo Git interface on your private Bitbucket Server.**
</Note>

### Bitbucket Pipeline

<Steps>
  <Step>
    **Create a pipelines file:** Create a new file named `bitbucket-pipelines.yml` with the content below:

    ```bash theme={null}
    pipelines:
        pull-requests:
          '**':
            - step:
                name: PR Agent Review
                image: codiumai/pr-agent:latest
                script:
                  - pr-agent --pr_url=https://bitbucket.org/$BITBUCKET_WORKSPACE/$BITBUCKET_REPO_SLUG/pull-requests/$BITBUCKET_PR_ID review
    ```
  </Step>

  <Step>
    **Select your authentication type:** You could select either `basic` or `bearer`.

    * `bearer` = just a token (more secure, no username/password exposure).
    * `basic` = username + password (or app password) combined and encoded.
  </Step>

  <Step>
    **Create a token:** Based on your authentication type, create a token.

    * **If your authentication type is** `**bearer**`, generate an access token for your Bitbucket repository:
      1. Go to your repository's settings.
      2. Choose **Secutiry** then **Access Tokens**.
      3. Generate an access token and save it somewhere safe.
    * **If your authentication type is** `**basic**`, generate a `base64` encoded token from your `username:password` combination and save it somewhere safe.
  </Step>

  <Step>
    **Add secure variables:** Go to your repository's settings. Choose **Pipelines**. Under **Repository variables**, add the following variables:

    * **OPENAI\_API\_KEY:** `<your key>`
    * **BITBUCKET.AUTH\_TYPE:** `basic` or `bearer` (default is `bearer`)
    * **BITBUCKET\_\_BEARER\_TOKEN** or **BITBUCKET.BASIC\_TOKEN:** `<your token>` (obtained from step 3)
  </Step>
</Steps>

**You’re all set!** Start using Qodo

<Note>
  [Visit our usage guide](/v1/getting-started/usage-guide) for next steps.
</Note>

<Warning>
  **Note:** Comments on a PR **are not supported** in Bitbucket Pipeline.
</Warning>
