Below is a step-by-step guide on how to integrate with BitBucket Cloud. You can connect your account via OAuth or username and password.
Important: Use a service account to create this integration. Learn more about creating a service account.
Git host permission requirements
Flow only requires read access to your repositories. Flow needs this permission to process the metadata used to generate our reports.
The account used to connect Flow to BitBucket must have these read scopes:
- Repository
- Issue
- Pull Request
- Account
Note: To successfully create and connect webhooks, the service account must be an admin in BitBucket.
Connect via OAuth
Connecting via OAuth is the preferred method to connect your repos and import your data, including pull requests and tickets.
- In the top navigation, click Settings.
- In the left-hand navigation under Integrations, click Integrations.
- Click Add Integration in the top right hand corner of the Integrations page.
- On the following page, select BitBucket from the integration provider list.
- Under the OAuth tab, click Connect to BitBucket.
- If you're already logged into your BitBucket account, a pop-up will appear prompting you to confirm access.
Note: If you're not already logged in, you'll be prompted to log in and authorize the connection.
- If the connection was successful you'll see the a success message.
- Once you've successfully connected, proceed to the Finishing up section of this article to complete the integration process.
Connect via username and password
To connect via your BitBucket username and password:
- Input your username and password, then click Test connection.
- If the connection was successful, you'll see a success message:
Two-factor authentication
Currently, two factor authentication is not supported via username and password logins.
If you try to connect via two factor authentication, you'll see an error message.
If your account has two-factor authentication enabled, you'll need to use an app password as your password.
Follow these instructions to create an app password (external site, opens in new tab) for your service account. When setting up the app password, select Read permissions for:
-
Account
-
Issues
-
Pull requests
-
Repositories
Finishing up
Once you have a successful connection, you can finalize your integration and begin importing repos as outlined below:
- Click Next from the BitBucket Authentication Method screen.
- On the next screen, select the services you want turned on. Then click Next. Leaving all three services on allows Flow to ingest repo, pull request, and ticket data. You can turn services on and off at any time.
- Name your integration so you can identify the connected account. Then click Create.
- Once you've successfully created a new BitBucket cloud integration, you'll see a success message.
- If you see all the appropriate groups and projects under the Repos tab, Flow has the correct access to any repos associated with these projects. To begin importing repos, click the repo import page link.
To learn more about managing your new integration settings, see Managing integrations.