# Bitbucket Cloud

Source: https://openpanel.sh/docs/git/bitbucket

Connect a Bitbucket Cloud account to OpenPanel with your Atlassian account email and an API token with Bitbucket scopes.

A Bitbucket account reads the repositories its user is a member of, on Bitbucket Cloud (bitbucket.org). For Bitbucket Server or Data Center, add each repository as [Git over SSH or HTTPS](/docs/git/any-git-server).

## The token [#the-token]

An Atlassian API token with scopes, for the Bitbucket app, with `read:user:bitbucket` and `read:repository:bitbucket`.

1. Open [id.atlassian.com/manage-profile/security/api-tokens](https://id.atlassian.com/manage-profile/security/api-tokens). The add dialog links to the same page.
2. Choose **Create API token with scopes**.
3. Give it a name and an expiry date, and choose the **Bitbucket** app.
4. Choose the scopes **read:user:bitbucket** and **read:repository:bitbucket**, and create the token.
5. Copy the token. Atlassian shows it only once.

## Add the account [#add-the-account]

1. In **Organization settings** → **Git accounts**, choose **Add Git account** → **Bitbucket**.
2. **Atlassian account email**: the email you sign in to Atlassian with.
3. Paste the token into **API token**, and choose **Add account**.

The address is always `https://bitbucket.org`, and Bitbucket accounts cannot be reached through the private network.

OpenPanel checks the token at once and shows whose it is and how many repositories it reads. If the check fails, nothing is saved.

## If the check fails [#if-the-check-fails]

| The console says | What to do |
|---|---|
| Enter the email of your Atlassian account. | Enter the email, not your Bitbucket username. |
| Bitbucket did not accept the token. … | Check the email, and copy the token again, whole. |
| Bitbucket refused the token for this. It needs: … | Make a token with scopes for the Bitbucket app, with both scopes above. |