> 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-community-build/project-administration/maintaining-project/changing-project-binding.md).

# Changing your project binding

You can bind an unbound project and you can change the binding of a bound project.

You must be an administrator of your project.

## Unbinding or changing the binding of a bound project

1. Retrieve your project. For more information, see [Retrieving projects](/sonarqube-community-build/user-guide/viewing-projects/retrieving-projects.md).
2. Go to **Project Settings** > **General Settings** > **DevOps Platform Integration**.
3. In the bottom of the page, select **Reset**. The project is unbound.
4. To bind the project to another repository, see [#binding-an-unbound-project](#binding-an-unbound-project "mention") below.

## **Binding an unbound project**

If you created your project manually, you can bind it to its DevOps platform repository to benefit from the features of a bound project.

To bind a project to a GitLab, Azure DevOps, Bitbucket Cloud, or Bitbucket Data Center repository, you need an access token stored in SonarQube Community Build for your user account: an API token for Bitbucket Cloud, or a personal access token for the other platforms. The credentials set on the global DevOps platform integration are not used for this, so you can only bind projects to repositories you have access to on the DevOps platform. If no token is stored for your user account, saving the binding fails with the message *personal access token for '\<configuration name>' is missing*.

To store a token for your user account, do one of the following:

* Start a repository import through **Create project** and select your DevOps platform. Before it lists your repositories, the import flow prompts you for a token.
* Call the `POST api/alm_integrations/set_pat` web API endpoint while signed in as the user who will save the binding. That user account needs the Create Projects permission. Set the `almSetting` parameter to the name of the DevOps platform configuration and the `pat` parameter to a valid token. For Bitbucket Cloud, also set the `username` parameter to the email address of your Bitbucket account.

To bind the project:

1. Retrieve your project in SonarQube Community Build. For more information, see [Retrieving projects](/sonarqube-community-build/user-guide/viewing-projects/retrieving-projects.md).
2. In front of the project name, select **Bind project**. The DevOps Platform Integration page opens.

<figure><img src="broken://spaces/KXW79zfYFiA8incTvwZK/files/RRLa1nm2q05TNwhbTRBJ" alt="Select bind project from the project overview page."><figcaption></figcaption></figure>

3. In **Configuration name**, enter the Configuration record used to manage your DevOps platform integration at the global level. Ask your system administrator.
4. This step depends on your DevOps platform:
   * GitHub: In **Repository name**, enter the name of the GitHub repository you want to bind.
   * Bitbucket Data Center: In **Project key** and **Repository slug**, enter the project key and the repository slug of the Bitbucket Data Center repository you want to bind. Both are part of the repository URL: `.../projects/<key>/repos/<slug>/browse`.
   * Bitbucket Cloud: In **Repository slug**, enter the URL of the Bitbucket Cloud repository you want to bind. The Repository slug is part of your Bitbucket Cloud URL. For example, `https://bitbucket.org/<workspace>/<repository>`
   * GitLab: In **Project ID**, enter the unique identifier of your GitLab project you want to bind.
   * Azure DevOps:
     * In **Project name**, enter the name of the Azure DevOps project containing your repository.
     * In **Repository name**, enter the name of the Azure DevOps repository you want to bind.
5. Select **Save**. The new binding is saved.
6. Select **Check configuration**. SonarQube Community Build checks if the entered DevOps platform repository exists and you have access to it.


---

# 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-community-build/project-administration/maintaining-project/changing-project-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.
