Bitbucket Server Setup

Updated 9 months ago by Jaala


Below is a step by step guide on how to get started with BitBucket Server. If your repositories are behind a firewall, please whitelist our IPs first.  Here is a link to get you started.  To use this method to connect to GitPrime, you will need to whitelist on port 443 over HTTPS.  You also need a public DNS record pointing to the IP address that is being exposed for GitPrime analysis.  This DNS entry should match the TLS/SSL certificate that the server is utilizing.

We strongly recommend you use a service account to create this Integration. Please see this help document for instructions to create a service account and read more about why service accounts are important here.

BitBucket Server Configuration:

Step 1: On any page of your Bitbucket Server, click the settings icon in the top right.
Step 2: Next, click “Users” in the left hand menu.
Step 3: Then, click the “Create User” button.*

Step 4: Fill in the form, taking note of the username and password you use.

Then, click “Create user”.

Step 5: Click “Change Permissions”.

Step 6: Under Global Permissions search for your new GitPrime user.  Once you see your new user in the results select it and click Add.

Step 7: Click the “Admin” checkbox for the user you just added.

Step 8: On your GitPrime Home page go to the left navigation bar. At the bottom go to then select Integrations.

Step 9: Select the Add Integration button in the top right hand corner of you Integrations screen. 

Step 10: On the following page select Bitbucket Server from the Integration Provider list and click Next.

Step 11: In this next step you can choose one of two ways to connect your Bitbucket Server account. Choose the connection that works best for you. 

A.) Username/Password -  You can 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 the following message:

If you receive an error when trying to connect your Bitbucket Server account verify the following and try again:

  • user name and/or password are correct
  • base URL is correct

If connected behind a firewall verify the following:

  • GitPrime’s IP addresses are whitelisted on port 443
  • a public DNS record is set up and pointing to the exposed IP address for GitPrime's use. 

B.) Access Tokens - You can connect via an access token. On the Access Token tab input 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.

If the connection was successful you will see the following 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. 

Step 12: Once you have successfully connected to your Bitbucket Server account, click Next.

Step 13: On the next screen you will be selecting the services you want turned on for this Integration. If you would like to import pull request data in addition to repo data, then leave all services on. You can turn services “on” and “off” at any time. Click Next.

Step 14: Name your Integration so you can identify the account you connected with. In this example we named it “Org’s Bitbucket Server”. Click Create.

Step 15: You have successfully created a new Bitbucket Server Integration.

Step 16: You can begin to import your repos by going to your repo import page. Click repo import page. To learn more about managing your new Integration settings, see Managing Integrations.

Still having issues connecting your Bitbucket Server account? Email us at or click on the chat icon in the bottom right corner of your screen.

How did we do?