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

# Bitbucket

> Connect Bitbucket repositories for streamlined deployments.

When adding an application, if you're using a private Git repository, you must select a Git provider and repository from your account. In addition to Bitbucket, you can also choose from [GitHub](/applications/git/github) or [GitLab](/applications/git/gitlab).

If you’re using Bitbucket and want to use GitHub repositories, you’ll need to import the repository from GitHub. Later in this guide, we’ll show you how to [import a GitHub repository into Bitbucket](#importing-a-github-repository).

<Warning>
  For security, your Git account creation date must be more than 30 days old. If it is less than 30 days old and you want to connect the Git account to Sevalla, please contact Sevalla’s Support Team.
</Warning>

## Grant access to the Sevalla Bitbucket application

The first time you [add an application](/applications/get-started/add-an-application) in Sevalla, you’ll need to connect to a git provider so that Sevalla can access your application’s repository. When you click **Create** > **Application**, you must choose your git provider and connect Sevalla to your account.

<Info>
  You can only connect one Bitbucket account to each Sevalla user. If you want to connect a different Bitbucket account, you must remove Sevalla's access to Bitbucket and reconnect to the other Bitbucket account.
</Info>

<Frame caption="Connect Sevalla with your Bitbucket account.">
  <img className="block dark:hidden" src="https://mintcdn.com/sevalla/40BMwYMBrkEyfQ_W/images/connect-bitbucket-light.png?fit=max&auto=format&n=40BMwYMBrkEyfQ_W&q=85&s=2757592024f088d2e3daf118b07858d1" alt="Connect Sevalla with your Bitbucket account" width="1520" height="744" data-path="images/connect-bitbucket-light.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/sevalla/40BMwYMBrkEyfQ_W/images/connect-bitbucket-dark.png?fit=max&auto=format&n=40BMwYMBrkEyfQ_W&q=85&s=1941f292fb7473f4f379abbefda01f81" alt="Connect Sevalla with your Bitbucket account" width="1530" height="866" data-path="images/connect-bitbucket-dark.png" />
</Frame>

If you aren’t logged in to Bitbucket, you’ll need to log in. On the next page, you’ll need to confirm Kinsta’s access to your Bitbucket account.

<Info>
  There may be occasions when you need to re-authenticate your Bitbucket account, such as when we release an update to the Bitbucket integration or if the token has expired. You can view the expiration date for the token in your User settings (click on your username and go to User settings > Access).
</Info>

<Frame caption="Confirm Kinsta's access to connect to your Bitbucket account.">
  <img src="https://mintcdn.com/sevalla/40BMwYMBrkEyfQ_W/images/bitbucket-confirm-access-light.png?fit=max&auto=format&n=40BMwYMBrkEyfQ_W&q=85&s=3a838cb0735fff45a738e0431eb60dc5" alt="" width="1228" height="1130" data-path="images/bitbucket-confirm-access-light.png" />
</Frame>

<Note>
  You may notice that the confirmation process is facilitated by [Kinsta](https://kinsta.com). Don't worry, as Sevalla is a Kinsta product, this is a normal part of the Sevalla experience. You'll still be interacting with Sevalla's features and services. Just follow the prompts to complete the confirmation, and you'll be all set!
</Note>

You will be returned to Sevalla. In **Application details**, select your application’s **Bitbucket repository** and **Default branch**. Then, continue with the rest of the Add application steps.

## Remove Sevalla's access to Bitbucket

To remove Sevalla’s access to your Bitbucket account, you’ll need to revoke access in your **User settings** in Sevalla and in Bitbucket:

In Sevalla, click on your username and go to **Account** > **Git login & repository access.** On **Repository access enabled**, click **Revoke** for the Bitbucket application and then click **Continue**.

This opens the Bitbucket App authorizations page, click **Revoke** next to the MyKinsta application.

## Importing a GitHub repository

1. Find the repository you want to use from [Sevalla’s example repositories at GitHub](https://github.com/orgs/kinsta/repositories?q=\&type=template\&language=\&sort=) and copy the URL.
2. In Bitbucket, click **Create** > **Repository** > **Import repository**.

<Frame caption="Create a new repository at Bitbucket.">
  <img src="https://mintcdn.com/sevalla/P1nS2Y4CmEqzZgea/images/bitbucket-create-repo-import.png?fit=max&auto=format&n=P1nS2Y4CmEqzZgea&q=85&s=dab8ccff1ed876232e42472462e40f5b" alt="" width="1600" height="974" data-path="images/bitbucket-create-repo-import.png" />
</Frame>

3. Paste the URL of the Sevalla repository in the URL field, select the **Project** you want to add it to, and click **Import repository**.

<Frame caption="Import a repository to Bitbucket.">
  <img src="https://mintcdn.com/sevalla/P1nS2Y4CmEqzZgea/images/bitbucket-import-repo.png?fit=max&auto=format&n=P1nS2Y4CmEqzZgea&q=85&s=61b03b51b73efe72850480bb8a9868cd" alt="" width="899" height="624" data-path="images/bitbucket-import-repo.png" />
</Frame>

4. When the import is complete, you can start using the repository in Bitbucket.

<Frame caption="Importing repository progress in Bitbucket.">
  <img src="https://mintcdn.com/sevalla/P1nS2Y4CmEqzZgea/images/bitbucket-importing-repo.png?fit=max&auto=format&n=P1nS2Y4CmEqzZgea&q=85&s=616cb6ba7095fce7b9ca00c693590c66" alt="" width="989" height="523" data-path="images/bitbucket-importing-repo.png" />
</Frame>

## Troubleshooting

### Missing repositories

If you’re having trouble seeing your repositories in **Add application**, you may need to re-authorize Sevalla’s access to Bitbucket. To do that, start by [removing access between Sevalla and Bitbucket](#remove-sevalla-access-to-bitbucket) as described above.

In **Add application**, go through the authentication and grant access steps to connect Sevalla to your Bitbucket account again.

### Conflicting namespaces

The `Conflicting namespaces` error appears when a Git account is connected to another Sevalla user account. Your Git account can only be linked to one Sevalla account; if you have multiple Sevalla accounts, you must use multiple Git accounts.

To resolve this error, you must log in to your other Sevalla account and [remove Sevalla access to Bitbucket](#remove-sevalla-access-to-bitbucket).
