You only have to do the following steps if you intend to include files from a Bitbucket Data Center. If you only use Bitbucket Cloud, you can ignore the following instructions.
Repeat these steps for every Bitbucket Data Center instance you want to access.
1. Requirements
The Bitbucket Server or Data Center needs to be accessible via https on the public internet.
You need admin permission on Confluence Cloud.
2. Configuration in Bitbucket Data Center
To access files from Bitbucket Data Center repositories, use a personal access token.
Note that all Confluence users share this personal access token and view private repository content the Bitbucket Data Center user has access to. Avoid using an adminstrator Bitbucket user. Think about using a specific user for this purpose.
Log into your Bitbucket Data Center with the your you want to use.
Navigate to ‘Avatar on the Right Upper Corner’ → Manage Account → Personal access tokens
Create a new token. The default read permissions are enough. Save the token.
Copy the generated token. You won’t be able to see it again. If you loose it you have to revoke and recreate the token.
3. Configuration in Confluence Cloud
Go to Confluence Configuration → Include Bitbucket Cloud. You should then see the following page:
Click Add.
Add your Bitbucket Data Center URL and the personal access token. Then submit the configuration.
Finished. Now you can include files from your Bitbucket Data Center/Server repositories.