AI Code Review for Bitbucket Data Center: Setup Guide 2026
How to set up AI-powered code review for Bitbucket Data Center. Step-by-step guide for enterprise teams using self-managed Bitbucket infrastructure.
Using Bitbucket? Get AI code review with Gemini, Claude & GPT.
Try it free on VS CodeAI Code Review for Bitbucket Data Center: Setup Guide 2026
Bitbucket Data Center is Atlassian's self-managed enterprise Git platform. If you're running Data Center on-premise or in your private cloud, this guide shows you how to set up AI-powered code review with Git AutoReview, the only AI tool with full Bitbucket Data Center support.
TL;DR: Key Points
- Git AutoReview fully supports Bitbucket Data Center (most competitors skip Bitbucket entirely)
- Works behind corporate firewalls: outbound HTTPS only, no inbound connections
- Human-in-the-loop approval prevents AI hallucinations from reaching your PRs
- BYOK (Bring Your Own Key) means code goes directly to your AI provider (Anthropic, Google, OpenAI)
- Setup takes 10-15 minutes: install extension, configure connection, add API keys
Works on-premise, behind firewalls, with SSO/LDAP. You approve every comment before it goes live.
Install the VS Code Extension →
Why AI Code Review for Bitbucket Data Center?
The Challenge: Most AI Tools Skip Bitbucket
Here's the frustrating reality for Bitbucket Data Center teams:
| AI Tool | GitHub | GitLab | Bitbucket Cloud | Bitbucket Data Center |
|---|---|---|---|---|
| Git AutoReview | ✅ | 🔜 Q1 2026 | ✅ | ✅ Full support |
| CodeRabbit | ✅ | ✅ | ❌ | ❌ |
| Qodo | ✅ | ✅ | ⚠️ Limited | ❌ |
| GitHub Copilot | ✅ | ❌ | ❌ | ❌ |
| Sourcery | ✅ | ✅ | ❌ | ❌ |
Git AutoReview is the only tool that fully supports Bitbucket Data Center.
Why Enterprise Teams Need AI Code Review
Time Savings:
- AI reviews complete in 10-60 seconds vs hours/days waiting for human reviewers
- 30-50% reduction in overall code review time
- Unblock PR bottlenecks during migrations or team growth
Quality Improvements:
- Catch 20-40% more bugs, security issues, and code smells
- Consistent review standards across all PRs
- Never miss obvious issues due to reviewer fatigue
Enterprise Requirements Met:
- Data privacy: BYOK means code goes directly to your AI provider
- Compliance: Works with SOC 2, ISO 27001, HIPAA requirements
- Network security: Outbound HTTPS only, no inbound connections
- Access control: Works with existing LDAP/SSO authentication
Git AutoReview Setup for Bitbucket Data Center
Follow these steps to deploy AI code review on your Data Center instance.
Prerequisites
Before starting, make sure you have:
- Bitbucket Data Center instance (any version 7.0+)
- VS Code installed (version 1.75 or later)
- Network access from developer machines to:
- Your Bitbucket Data Center URL
- AI provider endpoints (api.anthropic.com, generativelanguage.googleapis.com, or api.openai.com)
- Personal Access Token with REPO_READ and REPO_WRITE permissions
Step 1: Install Git AutoReview Extension
Open VS Code and install the extension:
Method A: Extension Marketplace
- Open VS Code
- Click Extensions icon (Cmd/Ctrl + Shift + X)
- Search "Git AutoReview"
- Click Install
Method B: Command Line
code --install-extension vitalii4reva.git-autoreview
Step 2: Generate Bitbucket Data Center Personal Access Token
Personal Access Tokens work with all authentication methods (SSO, LDAP, standard login).
- Log in to Bitbucket Data Center (via your SSO/LDAP if applicable)
- Navigate to User Settings → Click your profile icon → Settings
- Go to Personal Access Tokens → Manage → Create a token
- Configure token permissions:
- ✅ REPO_READ (read repository and PR data)
- ✅ REPO_WRITE (post review comments to PRs)
- Copy the token (you won't see it again)
Security tip: Store the token securely. Git AutoReview uses VS Code's secure storage, so the token is encrypted on your machine.
Step 3: Configure Git AutoReview Connection
Open Git AutoReview settings in VS Code:
- Open Command Palette (Cmd/Ctrl + Shift + P)
- Type "Git AutoReview: Settings" and press Enter
- Configure Bitbucket connection:
- Platform: Select "Bitbucket Data Center"
- Server URL: Enter your Data Center URL (e.g.,
https://bitbucket.yourcompany.com) - Access Token: Paste the Personal Access Token from Step 2
- Repository: Select or manually enter your repository path
Example configuration:
Platform: Bitbucket Data Center
Server URL: https://bitbucket.acme-corp.com
Access Token: [your token]
Repository: PROJECT/repo-name
Step 4: Configure AI API Keys (BYOK)
Git AutoReview uses BYOK (Bring Your Own Key), which means your code is sent directly to your chosen AI provider, not stored on third-party servers.
Choose your AI provider(s):
Option A: Claude (Anthropic)
- Best for: Complex codebases, architectural reviews
- Get API key: console.anthropic.com
- Cost: ~$0.50-1.00 per review
- Privacy: Anthropic doesn't train on customer data
Option B: Gemini (Google AI)
- Best for: Speed, newer frameworks
- Get API key: aistudio.google.com
- Cost: ~$0.30-0.70 per review
- Privacy: Google Cloud privacy terms apply
Option C: GPT (OpenAI)
- Best for: Broad language support, security scanning
- Get API key: platform.openai.com
- Cost: ~$0.40-0.80 per review
- Privacy: Enterprise agreement available, opt-out of training
Add API keys in Git AutoReview settings:
- Open Git AutoReview settings (Cmd/Ctrl + Shift + P → "Git AutoReview: Settings")
- Navigate to AI Models section
- Add API keys for chosen providers
- (Optional) Enable multiple models to run in parallel
Alternative: Use Git AutoReview's included credits on Team/Enterprise plans, no separate API key needed.
Step 5: Test the Setup
Verify everything works:
- Open Git AutoReview panel in VS Code (sidebar icon)
- Select a pull request from the list
- Click "Review with AI"
- Choose AI model (Claude, Gemini, or GPT)
- Wait 10-60 seconds for AI analysis
- Review AI suggestions (shown as drafts in VS Code)
- Approve, edit, or reject each suggestion
- Click "Publish to Bitbucket" to post approved comments to the PR
If you see AI suggestions in VS Code, setup is complete!
Install extension → Add token → Configure API keys → Start reviewing. Works behind firewalls.
Full Setup Guide →
Configuration Best Practices for Data Center
Network Security
Firewall Configuration:
Git AutoReview requires outbound HTTPS only, no inbound connections.
Whitelist these endpoints:
api.anthropic.com (port 443) — for Claude
generativelanguage.googleapis.com (port 443) — for Gemini
api.openai.com (port 443) — for GPT
Your Bitbucket Data Center doesn't need to be publicly accessible. Git AutoReview runs on developer machines, which connect to:
- Your internal Data Center instance (internal network)
- AI providers (outbound internet)
Proxy Configuration:
If your developers use a corporate proxy:
- Configure proxy in VS Code settings (Settings → Proxy)
- Git AutoReview uses VS Code's proxy automatically
- Test connection to AI provider APIs through proxy
Authentication Integration
SSO/LDAP Compatibility:
Personal Access Tokens work with all authentication methods:
- ✅ SAML SSO (Okta, Azure AD, etc.)
- ✅ LDAP (Active Directory, OpenLDAP)
- ✅ OAuth custom providers
- ✅ Standard Bitbucket authentication
Token Rotation:
For security compliance:
- Rotate tokens quarterly (or per policy)
- Revoke old tokens when team members leave
- Use short expiration if supported by your Data Center version
AI Model Selection
Single Model vs Multi-Model:
Single Model Approach:
- Choose one AI provider (Claude, Gemini, or GPT)
- Faster reviews (10-30 seconds)
- Lower cost (one API call per review)
Multi-Model Approach:
- Run Claude + Gemini + GPT in parallel
- Compare suggestions side-by-side
- Approve best suggestions from each model
- Higher quality (catches more issues)
- Higher cost (3x API calls)
Recommendation: Start with a single model (Claude for complex code, GPT for speed), then add multi-model for critical PRs.
Review Scope Configuration
File Types:
Exclude files that don't need review:
Include: *.js, *.ts, *.py, *.java, *.go
Exclude: *.test.js, *.spec.ts, package-lock.json, yarn.lock
Directories:
Skip vendor code and generated files:
Exclude:
- node_modules/
- vendor/
- dist/
- build/
- .next/
PR Size Limits:
Skip very large PRs to save costs:
Max files: 50
Max lines changed: 1000
Large refactors can be reviewed in chunks.
Security and Compliance Considerations
Data Privacy with BYOK
Where does your code go?
With BYOK (Bring Your Own Key):
- Developer machine → AI Provider API (direct connection)
- Code is analyzed in-flight (not stored by AI provider)
- Git AutoReview acts as pass-through (no code storage)
Git AutoReview does NOT:
- ❌ Store your code
- ❌ Log code snippets
- ❌ Train AI models on your data
- ❌ Share code with third parties
AI Provider Privacy:
- Anthropic (Claude): No training on customer data per enterprise privacy policy
- Google AI (Gemini): Google Cloud privacy terms apply
- OpenAI (GPT): Enterprise agreement available with opt-out of training
Compliance Framework Support
SOC 2 Type II:
- BYOK ensures code goes to SOC 2-certified providers
- Human-in-the-loop prevents automated changes
- Audit trail via Git AutoReview logs
ISO 27001:
- Code processing at certified providers (Anthropic, Google, OpenAI)
- No third-party code storage
- Access control via Bitbucket permissions
HIPAA (Healthcare):
- Use Anthropic or Google AI with BAA (Business Associate Agreement)
- Avoid OpenAI for PHI unless covered by enterprise agreement
- Self-hosted AI (local LLMs) coming in 2026 roadmap
GDPR (EU Data Protection):
- Code review doesn't typically involve personal data
- If test data includes names/emails, ensure AI provider has GDPR DPA
- Data residency: choose AI provider with EU data processing
Access Control
Who can use AI code review?
Access follows Bitbucket repository permissions:
- Developers with REPO_READ can run AI reviews
- Only users with REPO_WRITE can post comments to PRs
Audit trail:
- All AI-generated comments are posted under developer's Bitbucket account
- Git AutoReview logs (local) track which reviews were run
- Bitbucket audit logs show all PR activity
Integrating with Existing Workflows
Jira Integration
Git AutoReview integrates with Jira to verify acceptance criteria:
How it works:
- Link Jira ticket in PR title or branch name (e.g.,
PROJ-1234-add-auth) - Git AutoReview fetches the Jira ticket
- AI analyzes if code changes meet acceptance criteria
- You get a verification report before approving the PR
Example output:
Jira Ticket: INFRA-456 - Implement Redis caching
Acceptance Criteria Analysis:
✅ AC1: Add Redis client configuration — Implemented in config/redis.ts
✅ AC2: Cache user sessions — Implemented in middleware/session.ts
⚠️ AC3: Add cache invalidation on user update — Not found in PR
Recommendation: Add cache invalidation or update ticket scope.
Setup:
- Connect Atlassian account in Git AutoReview settings
- Grant Jira read permissions
- Git AutoReview automatically detects linked tickets
CI/CD Pipeline Integration
Git AutoReview vs CI/CD:
| Approach | When | Who Reviews |
|---|---|---|
| Manual (Git AutoReview) | Developer runs before pushing | PR author |
| CI/CD Integration | Auto-runs on PR creation | Automated |
Current state: Git AutoReview is a manual VS Code extension (developer-triggered).
Coming soon: Bitbucket Pipelines integration (auto-run on PR creation).
Workaround: Add to team workflow:
- Developer creates PR
- Developer runs Git AutoReview
- Developer approves/publishes AI suggestions
- Developer requests human review
Existing Code Review Process
Hybrid workflow (Human + AI):
Before AI:
- Developer creates PR
- Waits for human reviewer (hours to days)
- Human reviewer finds issues
- Developer fixes, repeat
With AI (recommended):
- Developer creates PR
- Runs AI review (10-60 seconds)
- Fixes issues AI caught
- Requests human review (fewer issues remain)
- Human reviewer focuses on architecture/business logic
Result: 30-50% faster reviews with higher quality and less reviewer fatigue.
Troubleshooting Common Issues
Issue: Cannot Connect to Bitbucket Data Center
Symptoms:
- "Connection refused" error
- "Unable to reach Bitbucket server"
Solutions:
- Verify URL: Ensure you're using the load balancer URL (not individual node IPs)
- Check VPN: If Data Center is internal-only, connect to VPN first
- Test connectivity: Run
curl https://bitbucket.yourcompany.comfrom terminal - Certificate issues: If using self-signed SSL, configure VS Code to accept it
Issue: AI API Calls Failing
Symptoms:
- "API request failed"
- "Network error"
Solutions:
- Check firewall: Whitelist api.anthropic.com, generativelanguage.googleapis.com, and api.openai.com
- Test API key: Run test request from terminal:
curl -H "Authorization: Bearer YOUR_API_KEY" https://api.anthropic.com/v1/messages - Proxy settings: Configure proxy in VS Code if required
- API quota: Check AI provider dashboard for rate limits
Issue: Personal Access Token Rejected
Symptoms:
- "Authentication failed"
- "Invalid token"
Solutions:
- Verify permissions: Token needs REPO_READ + REPO_WRITE
- Check expiration: Tokens may have expiration dates
- Regenerate token: Create new token if old one is revoked
- SSO session: If using SSO, ensure you're logged in when creating token
Issue: AI Suggestions Not Appearing
Symptoms:
- Review completes but no suggestions shown
Solutions:
- Check PR size: Very small PRs may have no issues
- File types: Ensure files are in included list (not excluded)
- Review scope: Check if directories/files are excluded by config
- Model response: Check Git AutoReview logs for AI model errors
Cost Optimization
API Usage Estimates
Typical costs per review (based on average PR size of 200 lines):
| AI Model | Cost per Review | Cost per 100 Reviews | Cost per 1000 Reviews |
|---|---|---|---|
| Claude (Anthropic) | $0.50-1.00 | $50-100 | $500-1000 |
| Gemini (Google AI) | $0.30-0.70 | $30-70 | $300-700 |
| GPT (OpenAI) | $0.40-0.80 | $40-80 | $400-800 |
For a team of 20 developers:
- 5 PRs per developer per week = 100 PRs/week
- 400 PRs/month
- Monthly cost: $120-400 (varies by AI model and PR size)
Cost-Saving Strategies
1. Use selective review:
- Run AI on critical PRs only (security, core features)
- Skip trivial PRs (typo fixes, config tweaks)
2. Optimize review scope:
- Exclude test files, docs, generated code
- Set max PR size limits
3. Choose cost-effective models:
- Gemini for speed and lower cost
- Claude for complex PRs only
- GPT for security-focused reviews
4. Use included credits:
- Git AutoReview Team plan includes credits
- No separate API billing for small teams
Next Steps
You now have AI code review running on Bitbucket Data Center. Here's what to do next:
Week 1: Pilot Testing
- Run AI reviews on 10-20 PRs
- Collect feedback from pilot team
- Calibrate which AI suggestions are valuable vs noise
Week 2-4: Team Rollout
- Train entire engineering team
- Document team conventions (when to use AI review)
- Monitor usage and costs
Month 2+: Optimization
- Adjust review scope based on feedback
- Rotate Personal Access Tokens (security)
- Measure time savings and bug catch rate
Free plan available. $14.99/month for teams. Works on-premise, behind firewalls.
Install the Extension → View Pricing
Frequently Asked Questions
Does Git AutoReview work with clustered Data Center?
Yes. Use your load balancer URL (not individual node IPs). Git AutoReview connects through the load balancer, which distributes requests across nodes.
Can I use Git AutoReview with SSO/LDAP?
Yes. Use Personal Access Tokens, which work with all authentication methods (SAML, LDAP, OAuth).
Is my code sent to Git AutoReview servers?
No. With BYOK, your code goes directly from VS Code to your AI provider (Anthropic, Google, or OpenAI). Git AutoReview acts as a pass-through.
What if my Data Center is completely offline (air-gapped)?
Current version requires internet access to AI providers. Self-hosted AI (local LLMs) is on the 2026 roadmap for air-gapped environments.
How do I handle firewall rules for AI APIs?
Whitelist outbound HTTPS (port 443) to: api.anthropic.com, generativelanguage.googleapis.com, api.openai.com. No inbound connections needed.
Can multiple developers use the same Personal Access Token?
No. Each developer should generate their own token. This ensures proper audit trails (comments are posted under the developer's account).
Does Git AutoReview support Bitbucket Data Center plugins?
Git AutoReview is a VS Code extension (not a Bitbucket plugin). It works alongside your existing Data Center plugins without conflicts.
How is this different from Bitbucket Cloud?
Setup is nearly identical. Main difference: Data Center uses Personal Access Tokens (not OAuth), and you configure your Data Center URL (not bitbucket.org).
Related Resources
Setup Guides:
- Bitbucket Server AI Code Review Setup Guide — Complete guide for Server, Data Center, and Cloud
- Bitbucket Cloud vs Data Center Comparison — Which platform is right for you?
- AI Code Review for Bitbucket — Why most tools skip Bitbucket
Landing Pages:
- Bitbucket AI Code Review — Full feature overview
- Pricing — Git AutoReview plans
Using Bitbucket? Get AI code review with Gemini, Claude & GPT.
Try it free on VS CodeAdd AI code review to your Bitbucket workflow
10 free AI reviews per day. Works with GitHub, GitLab, and Bitbucket. Setup takes 2 minutes.
Free forever for 1 repo • Setup in 2 minutes
Related Articles
From Manual to AI: A Bitbucket Team's Guide to AI Code Review
ROI data, migration playbook, and practical setup for engineering managers bringing AI code review to Bitbucket teams. McKinsey: 56% faster. GitHub: 71% time-to-first-PR reduction.
Bitbucket Cloud vs Data Center vs Server: Complete Comparison 2026
Compare Bitbucket Cloud, Data Center, and Server (EOL). Features, pricing, migration paths, and which is right for your team in 2026.
Claude Opus 4.6 for Code Review: The Bug Hunter AI | 2026 Deep Dive
Claude Opus 4.6 scores #1 on SWE-bench Verified (80.8%). Deep dive into benchmarks, cost-per-review, security audit capabilities, and when to use Claude for AI code review.
Get code review tips in your inbox
Join developers getting weekly insights on AI-powered code reviews. No spam.
Unsubscribe anytime. We respect your inbox.