This is a step-by-step guide on getting started with BitBucket Server. If your repositories are behind a firewall, allowlist our IPs on port 443 over HTTPS. You also need a public DNS record pointing to the IP address being exposed for Flow analysis. This DNS entry should match the TLS/SSL certificate the server is utilizing.
Important: Use a service account to create this integration. Learn more about creating a service account.
BitBucket Server configuration
Follow the BitBucket Server's instructions to create a user (external site, opens in new tab). Set the username and password when you create the user and remember it for later.
Important: Do not check the box to email the user with a link to set their password.
- Once you've created the user, click Change permissions. Search for the user you just created and click Add. Give the user access to the API with repo_read. Learn more about BitBucket Server's global permissions (external site, opens in new tab).
- In Flow, navigate to Settings.
- Under Integrations, click Integrations.
- Click Add Integration in the top right corner of the Integrations page.
- On the following page, select BitBucket Server from the integration provider list and click Next.
- Connect your BitBucket Server account through a username and password or through access tokens.
-
Username/Password—Connect to your account using your BitBucket credentials under the Username/Password tab. Input your credentials and base URL and click Test connection.
- If the connection was successful, you will see a success message.
- If you receive an error when trying to connect your BitBucket Server account, verify the username, password, and base URL are correct.
-
Access tokens—Connect via an access token. On the Access token tab enter your access token and click Test connection. For more information on where to create an access token in BitBucket Server, see BitBucket’s support document, Personal access tokens (external site, opens in new tab).
- If the connection was successful, you will see a success message.
- If you receive an error when trying to connect your BitBucket Server account using an access token, verify the access token and base URL and try again.
- If you are connected behind a firewall, verify the following:
- Flow's IP addresses are allowlisted on port 443
- A public DNS record is set up and pointing to the exposed IP address for Flow's use
- Once you are successfully connected to your BitBucket Server account, click Next.
-
Username/Password—Connect to your account using your BitBucket credentials under the Username/Password tab. Input your credentials and base URL and click Test connection.
- On the next screen, select the services you want turned on for this integration. If you want to import pull request data in addition to repo data, leave all services on. You can turn services on and off at any time. Click Next.
- Name your integration so you can identify the account you connected. Click Create.
To begin importing your repos, go to your repo import page and click the repo import page link. To learn more about managing your new integration settings, see Manage integrations.
Troubleshooting
CAPTCHA must be disabled in your BitBucket Server instance to properly connect to Flow. CAPTCHA turns on automatically when there are failed attempts to authenticate BitBucket Server.
If you're having trouble connecting to BitBucket Server or notice the repos aren't updating, the CAPTCHA may have been activated. Ask your BitBucket Server administrator admin to disable the CAPTCHA and try connecting or updating again.