This guide will walk you through setting up a Bitbucket repository for Review Board or your RBCommons team.


Step 1: Add the repository


Go to your administration UI (https://<yourserver>/admin/ on Review Board, or https://rbcommons.com/s/<teamname>/admin/ on RBCommons) and click Repositories. Then click the button for creating a new repository.


Choose a name, and then choose "Bitbucket" as the hosting service.



Step 2: Link your Bitbucket account


If this is your first repository, you will be prompted to link a Bitbucket account. This must be one that has read access to the repositories you want to add. You must specify your Bitbucket e-mail address and password.





Step 3: Fill in your repository information

Next, you'll need to specify the repository plan, which is the type of repository you're working with. This is either "Personal" or "Team", depending on whether the repository is part of a team or not.

For team repositories, you'll be asked for the name of that team. This is the name as you'd find it in the URL. For instance, for https://bitbucket.org/myteam/myrepo, it would be myteam.


Next, type the name of your repository. This is also the name as you'd find it in the URL (myrepo for https://bitbucket.org/myteam/myrepo).





Step 4: Choose a bug tracker

You probably have a bug tracker, and it might be on Bitbucket. If you're using the bug tracker on Bitbucket that was created for your repository, simply click "Use hosting service's bug tracker."


If you're using any other bug tracker (such as a tracker for another Bitbucket repository, or a custom Bugzilla server, or anything else), then you'll want to choose the type from the list and fill out the details.





Step 5: Choose an access level


Last, if you want to limit access to this repository, you can uncheck "Publicly accessible" and then configure which users or review groups have access to this repository. Only those users (or members of those groups) will be able to post and view review requests against that repository.



Step 6: Save the repository


At this point, you should be able to save the repository.



Note: If you're using a Bitbucket repository with Git, you'll have to use the RBTools command-line tools to post your changes. This is due to a limitation in the Bitbucket APIs.