Connecting to BitBucket Server

Tags: Flow on-prem

Connecting to BitBucket Server

Flow Enterprise works with your internal BitBucket Server installation. BitBucket Server does not require global system Oauth keys. Instead, it can be configured multiple times by multiple people. The configuration for BitBucket Server happens inside GitPrime, not the administration console.

The BitBucket server is done using a username/password combination. We recommend that you create a "service account" for this integration. Your integration is only as secure as the user that is used, and if they are in some way compromised, your integration can also be compromised. The user you use for the integration must have administrative privileges.  You should create a user that has access to BitBucket Server that is used ONLY for the purposes of integration with Flow Enterprise. This user should have a very secure password that is only shared with the most trusted personnel according to your company's security policies and practices.

Note: Currently BitBucket 5.X version are supported. BitBucket maintains backwards compatibility within a major version, but there may be breaking changes to the API on other major versions.

  1. Log in to your BitBucket Server installation.
  2. Click on the gear icon in top right corner to navigate to BitBucket Server's settings.
  3. We recommend creating a service account for connecting GitPrime Enterprise to BitBucket Server. To create this user, browse to the Users section of the menu and then click Create User. If you are not creating a service account for this purpose, you can skip to the next step.

    Tip: If your BitBucket Server is integrated with LDAP or an SSO solution, you can also create the user inside the main user information source used by that solution. For example, if you are using LDAP to integrate with your Active Directory, you can add the service account inside the Active Directory according to normal processes and then move to the next step.
    Once you click Create User, you will be presented with a user creation screen. The fields should be filled out as follows:

    • Username: This is the username for the account
    • Full Name: A human-readable, easy to recognize name for the account
    • E-mail Address: The e-mail address for the user.
    • E-mail a link to the user to set their password Checkbox: You can check this if you want to make this user/service account go through the normal password settings. However, if you have already generated a secure password, you can uncheck this box.
    • Password/Confirm Password: This is the initial password of the user.
  4. Go to the Global Permissionssection of the settings. You will be presented with the "Global Permissions" screen which will allow you to search for the user you just created and assign permissions. To do this, enter the username of the user you wish to use to integrate with Flow Enterprise and select the user from the list that appears. Then press Add. The user will now appear in the list of users granted access. You next need to grant them appropriate permissions. Because of how BitBucket Server does integration, this user will need to be an Admin on the system. Click the box in the Admin column to enable these privileges.

  5. Next, go to the URL where you have placed Flow Enterprise. For example,

  6. Next, browse in the My Data menu to Repos. From there, click the Add Repos button to drop down the options and choose BitBucket Server.

  7. Use the information for your integration user to finish configuring your connection to BitBucket. Then click Save to move to the next step. The fields here are simple:

    • Base URL: This is the URL of your BitBucket Server installation. It must be a full URL. For example
    • Username: This is the username of your integration user.
    • Password: This is the password for your integration user.
  8. You should now be redirected to a screen similar to the one shown below. In this screen, you will find your repositories segmented by the organizations the connected user has access to. You can click the Import button for any repositories you wish to analyze in Flow Enterprise. You can also click Import all repos for any organization you want to completely analyze. You may also choose to auto-import any new repositories by changing the Auto-import all future repositories toggle for any organization.


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 integrating 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.

back to top

If you need help, please email Support (opens email form) for 24/7 assistance.