Connecting to BitBucket Cloud

Tags: Flow on-prem

To set up Flow Enterprise to work with BitBucket Cloud, Flow Enterprise requires that an Oauth integration be configured in your BitBucket account.  It is recommended that you consider creating a "server user" account that has access to all of the teams and repositories you wish to analyze.  You should then use that user to configure the Oauth integration.

  1. Go to https://bitbucket.com and login as a user that has access to modify the account.
  2. Navigate to the BitBucket Settings section by clicking your your icon in the lower left-hand corner of the screen.
  3. By default, when you enter the settings screen, you will be placed into your personal account settings.  You must select the settings for you main organization.
  4. Next, you need to create a new OAuth Consumer integration.  This can be found by clicking OAuth under the Access Management section of the left-hand menu.  Once you find that section, click Add Consumer.
  5. Adding the consumer requires filling out two sections: Details and Permissions.
    The details section has several fields.  Please fill them out according to these guidelines:
    • Name:  This should be an easily recognizable name for your Flow Enterprise instance.  For example, "Flow Enterprise Integration," for a literal use.  Or, if you have multiple Flow Enterprise Integrations, perhaps per department, you might use "Flow Enterprise: Core System Developers."
    • Description:  A more verbose description of the integration.
    • Callback URL: This URL is the URL that BitBucket will redirect the user browser to after OAuth authentication has been performed.  This should be on the format of https://<your Flow Enterprise hostname>/accounts/complete/bitbucket-oauth2.  For example, if your Flow Enterprise instance is at flow.mycompany.com, you would enter: https://flow.mycompany.com/accounts/complete/bitbucket-oauth2/
    • URL:  This is the root URL of your Flow Enterprise instance.  For example, https://gitprime.mycompany.com
    • "This is a private consumer" Checkbox:  This should be checked.
  6. The permissions section allows you to control how much access GitPrime Enterprise will have to your repositories and other BitBucket account data.  We recommend that you grant the following permissions:

    Permission GroupGranted PermissionsDescription
    Account
    • E-mail
    • Read
    Amount of access to the account level data Flow Enterprise needs.  Flow Enterprise needs to be able to read the general information.
    Team Membership
    • Read
    Team Membership access, including listing your users.  Flow Enterprise uses this to sync your team membership on the server.
    Projects
    • Read
    Read access to project information lets Flow Enterprise scan issue and repository data more efficiently.
    Repositories
    • Read
    Flow Enterprise requires read access to repositories to do the core analysis of your code.
    Pull Requests
    • Read
    Flow Enterprise requires read access to pull requests.
    Issues
    • Read
    Flow Enterprise requires read access to your issue data if you want to track that data in Flow.
    Wikis
    • None
    Flow Enterprise does not need this access.
    Snippets
    • None
    Flow Enterprise does not need this access.
    Webhooks
    • Read
    • Write
    Flow Enterprise requires read and write access to your webhooks so that it can best integrate and keep code analysis up to date.
    Pipelines
    • None
    Flow Enterprise does not need this access.

  7. Once you have filled out the data, click Save and you should now see your application listed in the list of OAuth Consumers. 

    Click on the integration, and it will show you a Key and Secret.  Navigate to the Flow Enterprise Administration Console (see Configuring Flow Enterprise) and enter this key/secret pair in the BitBucket Settings section.

  8. Click Save and allow Flow Enterprise to restart.  At this point, BitBucket functionality should be enabled.

  9. To connect Flow Enterprise to BitBucket, browse to the Repos section under My Data.

  10. Click Add Repos and choose BitBucket.

  11. You will be asked to connect to BitBucket if you have not already done so.  Click Connect BitBucket to continue.

  12. You will now be forwarded to BitBucket for OAuth confirmation.  You will be asked to login to BitBucket (if you are not already). You will then be asked to confirm the integration and grant the privileges requested that we setup earlier.

  13. Clicking Grant should return you to Flow Enterprise where you will now be able to import repositories from BitBucket.

back to top


If you need help, please email support@pluralsight.com for 24/7 assistance.