# Importing your Bitbucket Cloud repository

Once the integration of your SonarQube instance with Bitbucket Cloud has been properly set up, you can import a Bitbucket Cloud repository to create the corresponding project in SonarQube. To do so, you need the Create Project permission in SonarQube.

The so-created SonarQube project is "bound" to its Bitbucket Cloud repository. With a bound project:

* The project’s main branch name will be automatically set up from Bitbucket.
* The quality gate status report to the pull requests will be automatically set up.

{% hint style="info" %}
Starting in[ Enterprise edition](https://www.sonarsource.com/plans-and-pricing/enterprise/), you can import a Bitbucket Cloud monorepo. See [Managing monorepo projects](/sonarqube-server/2026.2/project-administration/monorepos.md).
{% endhint %}

## Step 1: Create an API token

You must provide a Bitbucket Cloud [API token](https://support.atlassian.com/bitbucket-cloud/docs/api-tokens/). Your API token needs the `read:repository:bitbucket` scope (Read permission for the repositories). To avoid exceeding [Bitbucket Cloud API rate limits](https://support.atlassian.com/bitbucket-cloud/docs/api-request-limits/), it is recommended to use a dedicated Bitbucket user for SonarQube integration.

{% hint style="warning" %}
Bitbucket's API tokens replace the App passwords which are deprecated. See the[ Bitbucket documentation](https://www.atlassian.com/blog/bitbucket/bitbucket-cloud-transitions-to-api-tokens-enhancing-security-with-app-password-deprecation) for more details.
{% endhint %}

## Step 2: Import one or several repositories

1. Select **Create Project** > **From Bitbucket Cloud**. The Bitbucket Cloud project onboarding page opens.

<figure><img src="/spaces/KXW79zfYFiA8incTvwZK/files/WQTcqbGGKATA3KbQj6ry" alt="The first time you import a Bitbucket Cloud repository into SonarQube, you must enter a username and an App password."><figcaption></figcaption></figure>

1. In **Altassian's account email address**, enter your email address.
2. In **API token**, enter the API token you created in Step 1.
3. Select **Save**. The projects and repositories to which the token has access are listed on the page.
4. Select one or several repositories to be imported and follow the instructions.

## Related pages

[Binding to Bitbucket Cloud](/sonarqube-server/2026.2/instance-administration/devops-platforms/bitbucket-cloud.md)\
[Configuring Bitbucket Cloud project binding](/sonarqube-server/2026.2/project-administration/creating-project/bitbucket-cloud/configure-binding.md)\
[Bitbucket Pipelines](/sonarqube-server/2026.2/analyzing-source-code/ci-integration/bitbucket-pipelines.md)\
[Broken mention](broken://pages/LufChXMxsSzBVATDYVjX)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sonarsource.com/sonarqube-server/2026.2/project-administration/creating-project/bitbucket-cloud/import-repos.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
