> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/sonarqube-server/project-administration/creating-project/bitbucket-data-center/configure-binding.md).

# Configuring Bitbucket Data Center project binding

How to set up Bitbucket Data Center integration features for your SonarQube Server 2026.5 project.

## Reporting your quality gate status to Bitbucket for unbound projects

On SonarQube Server projects bound to their Bitbucket repository, SonarQube Server automatically sets up the report of your quality gate status and analysis metrics directly to your pull requests. For unbound projects, you must set up the quality gate status report manually. The integration of your SonarQube Server instance with Bitbucket Data Center must be properly set up.

To save the binding, you need a personal access token stored in SonarQube Server for your user account. The token set on the global DevOps platform integration is not used for this. For more information, see [Changing your project binding](/sonarqube-server/project-administration/maintaining-project/changing-project-binding.md#binding-an-unbound-project).

To report your quality gate status in Bitbucket for unbound projects:

1. In your SonarQube Server project, go to **Project settings** > **General settings** > **DevOps platform integration**.
2. Set:
   * **Configuration name**: The configuration name that corresponds to your DevOps platform instance.
   * **Project key**: The project key is part of your Bitbucket repository URL (`.../projects/<key>/repos/<slug>/browse`).
   * **Repository slug**: The repository slug is part of your Bitbucket repository URL (`.../projects/<key>/repos/<slug>/browse`).
3. Select **Save configuration**.

## Preventing pull request merges when the quality gate fails

After setting up pull request analysis, you can block pull requests from being merged if they fail the quality gate. To do this:

1. In Bitbucket Data Center, go to **Repository settings** > **Code Insights**.
2. Add a required report called `com.sonarsource.sonarqube`.
3. Select **Must pass** as the **Required status**.
4. Select **Must not have any annotations** as the **Annotation requirements**.

{% hint style="info" %}
Preventing pull request merges when the quality gate fails is not supported for monorepos.
{% endhint %}

## Related pages

[Binding to Bitbucket Data Center](/sonarqube-server/instance-administration/devops-platforms/bitbucket-data-center.md)\
[Importing your Bitbucket Data Center repository](/sonarqube-server/project-administration/creating-project/bitbucket-data-center/import-repos.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sonarsource.com/sonarqube-server/project-administration/creating-project/bitbucket-data-center/configure-binding.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
