For a hands-on tutorial with CodeRabbit performing code reviews on a live repository, see Quickstart.
- Automated code reviews for newly created pull requests
- Intelligent comments and suggestions displayed directly on pull requests
- Real-time bot interaction for immediate feedback and assistance
- Seamless webhook integration for continuous monitoring
Prerequisites
Before starting, you need to set up the following in your Bitbucket Data Center instance:Create a bot user
Create a dedicated Bitbucket user for CodeRabbit (e.g., âCodeRabbitâ). This user will post code review comments on pull requests.
- Add the bot user to each project where you want CodeRabbit to review pull requests
- Grant the bot user write permissions on the relevant repositories
Generate an HTTP Access Token for the bot user
Generate an HTTP Access Token for the bot user:
- Log in as the bot user
- Navigate to Manage Account and select HTTP Access Tokens
- Create a new token with repository write permissions
Create an OAuth consumer
Create an OAuth consumer in your Bitbucket Data Center administration:
- Navigate to Administration and then Application Links
- Create a new External application with an Incoming link
- Set the Redirect URL to:
https://app.coderabbit.ai/login - Grant the following permissions:
- Repository Read
- Repository Write
- Project Read
- Note the Client ID and Client Secret
Connect to CodeRabbit
Navigate to the CodeRabbit login page
Go to the CodeRabbit login page and select Bitbucket Data Center.
Enter your Bitbucket Data Center URL
Enter the URL of your Bitbucket Data Center instance (e.g.,
https://bitbucket.company.com) and click Submit.If your instance is already registered, you will be redirected to the OAuth authorization flow. Otherwise, you will be prompted to provide your credentials.Provide credentials
If this is the first time connecting your instance, provide:
- Bot Token: The HTTP Access Token you generated for the bot user
- Client ID: The OAuth consumer Client ID
- Client Secret: The OAuth consumer Client Secret
Install CodeRabbit on your repositories
After logging in, the onboarding wizard guides you through selecting projects and repositories.Select a project
Choose the Bitbucket Data Center project containing the repositories you want CodeRabbit to review.
CodeRabbit will automatically configure webhooks for the selected repositories. Once installed, CodeRabbit begins reviewing new pull requests immediately.
Configure network access
If your Bitbucket Data Center instance requires IP allowlisting, add these CodeRabbit IP addresses:IPs to allow list
Manage credentials
You can update the bot userâs HTTP Access Token at any time:- Navigate to Organization Settings in the CodeRabbit app
- Select the Bitbucket DC User tab
- Enter the new HTTP Access Token
- Save your changes
Troubleshooting
Bot token validation fails
Bot token validation fails
- Verify the HTTP Access Token has the correct permissions (repository write)
- Ensure the bot user account is active and not locked
- Check that your Bitbucket Data Center URL is correct and accessible from the internet
OAuth authorization fails
OAuth authorization fails
Webhooks not working
Webhooks not working
- Ensure your Bitbucket Data Center instance can reach CodeRabbitâs servers
- Check webhook configurations in your repository settings
- Verify the bot user has write access to the repositories
Reviews not posting
Reviews not posting
- Confirm the bot user is added to the project with write permissions
- Verify the HTTP Access Token has not expired
- Check that webhooks are properly configured and active
For additional support, visit the support page.
Whatâs next
Configure CodeRabbit
Customize review behavior, language settings, and rules for your repositories.
Code Review Overview
Learn how CodeRabbit reviews your pull requests and provides actionable feedback.
Get Support
Reach out to the CodeRabbit team for help with setup or integration issues.