---
title: "Connecting Pipelines to your Bitbucket repo"
date: "2024-02-14T06:18:38+00:00"
summary: "Seamlessly integrate your Cloud Platform CD environments with Bitbucket repositories using Pipelines. Learn requirements, step-by-step connection process, and how to leverage YAML build definition files for efficient development workflows."
image:
type: "page"
url: "/acquia-cloud-platform/connecting-pipelines-your-bitbucket-repo"
id: "9583e06a-bb9e-45cd-82d8-c93c1ba77efd"
---

Pipelines helps you to integrate applications on your Cloud Platform CD environments with version control repositories hosted by Bitbucket.

To connect your regular Cloud Platform environments with Bitbucket, visit [Using Cloud Platform with a remote repository](/acquia-cloud-platform/develop-apps/repository/github)

Important considerations
------------------------

*   Pipelines cannot be connected to newly-created Bitbucket accounts because of the following reasons:
    *   Bitbucket no longer supports default workspaces.
    *   Pipelines does not support custom workspaces.
*   Pipelines can be connected only to repositories owned by the current Bitbucket user.
*   This feature works only with Bitbucket Cloud and not with Bitbucket Server.
*   Only account owners can connect to repositories created under the default workspace of the Bitbucket account.
*   The workspace ID is a part of the URL of the repository, and the default workspace has the same name as the user name.

For more issues, see [Known issues](/acquia-cloud-platform/features/pipelines/known-issues) and [Known issues in Cloud Platform CD](/acquia-cloud-platform/features/cd/known-issues).

Requirements
------------

Before you connect a CD environment to your repository, ensure you meet the requirements for your repository, based on the following:

*   _If you don’t have a Bitbucket repository_, [sign in to your Bitbucket account](https://bitbucket.org), and then visit [bitbucket.org/repo/create](https://bitbucket.org/repo/create) to create a new repository from the Bitbucket UI.
*   _If you have an existing repository,_ add Bitbucket as a new remote by modifying your project repository’s local clone with the following code (where `[username]` is your Bitbucket username and `[project]` is the name of your project):
    
        git remote add bitbucket git@bitbucket.org:[username]/[project].git
        git push bitbucket master
    

Procedure
---------

To use the Cloud Platform interface to connect an application on a CD environment with your Bitbucket repository:

1.  [Sign in to the Cloud Platform user interface](/node/55875).
2.  Click the name of the application you want to connect to Bitbucket.
3.  In the left menu, click **Pipelines**. If your application doesn’t display a **Pipelines** link, [contact Acquia Support](/service-offerings/support#contact-acquia-support).
4.  Select **More links** > **View Application Info**.
5.  In the **Connected repository information** section, click the **Configure** link. A configured Git email address is required. If the email address is invalid, Pipelines jobs won’t start when changes are pushed, and webhooks will fail with HTTP 500 errors.
    
    ![Clicking the Configure link](https://acquia.widen.net/content/k9fgdruyer/png/pipelines_clicking-configure-link.png?crop=false&position=c&color=ffffffff&u=0b06mk&w=550&h=264)
    
6.  In the **Select Source** section, click the **Choose source** link.
    
    ![Selecting source](https://acquia.widen.net/content/slapafzgzp/png/pipelines_selecting-source.png?crop=false&position=c&color=ffffffff&u=0b06mk&w=278&h=216)
    
7.  Click the **Configure** link for the **Configure Pipelines with your Bitbucket repository** section.
    
    ![Selecting Bitbucket](https://acquia.widen.net/content/bpbpligg0l/png/pipelines_selecting-bitbucket.png?crop=false&position=c&color=ffffffff&u=0b06mk&w=309&h=254)
    
8.  Click **Connect to Bitbucket**. Pipelines will connect to Bitbucket and display a confirmation page.
9.  Click the **Grant access** button in the Bitbucket interface to grant your application access to your Bitbucket repository. The Cloud Platform interface for your environment’s pipelines information will be displayed.
10.  Click **Select Bitbucket repository**.
11.  Select the repository to which you want to connect, and then click **Continue**.

Each time you use Bitbucket to create or reopen a pull request or push a commit, Cloud Platform executes the `pipelines start` command using the build definition file in the Bitbucket repository, and commits the [resulting build artifact](../artifacts.html#pipelines-build-artifact), named `pipelines-build-[BRANCHNAME]`, to your Cloud Platform repository.

Next step
---------

To operate, Pipelines expects a file in YAML format named `acquia-pipelines.yaml` to exist in the root directory of your code repository. This build definition file has all the information required for Pipelines to perform the build, including any variables required and the instructions used to perform the build. Pipelines can build from both forked and non-forked repositories.

For information about how to structure the file and what it should contain, see [Creating and managing your build definition file](/acquia-cloud-platform/features/pipelines/yaml).