Create a dedicated Bitbucket service account for Garth rather than binding
the integration to a personal account. Code reviews will be attributed to this
account.
1
Register the account
Log out of your personal Bitbucket account and create a new user specifically for this integration.
2
Finalize the profile
Set the username to something identifiable, such as GPRABot. - Use a team
alias email rather than a personal address. - Enable Two-Step Verification
(2FA) if required by your company policy.
3
Associate with your workspace
Add the new service account to your primary Bitbucket workspace and grant it at minimum Developer access on the projects you want Garth to analyze.
When you rotate the service account later, update the token in Garth and
re-enable repository tracking — no other reconfiguration is needed.
Select the Bitbucket tab. Enter your Bitbucket URL
(https://bitbucket.org/your-workspace), Username (the service account’s
email), and Personal Access Token, then click Validate.
Enter your Bitbucket URL, username, and Personal Access Token, then click Validate
3
Install repositories
After validation, select the repositories you want Garth to review and click Install Repositories.
Automatic webhooks: Garth installs webhooks on selected repositories automatically. No manual webhook configuration is required. Webhooks are also removed automatically when you uninstall a repository.
Select the repositories you want Garth to review and click Install Repositories
Verify Auto Review is enabled — ensure the Auto Review toggle is turned on for the repository.
Check branch exclusions — confirm the source or destination branch of your PR is not listed under Source Branches to Exclude or Destination Branches to Exclude.
Check file exclusions — verify that the files changed in your PR are not covered by patterns in Files to Exclude.
Authentication errors
If you receive authentication or permission errors:
Check token expiry — Bitbucket API tokens can expire; regenerate and update the token in Garth if needed.
Confirm the username field — the Username entered during setup must be the service account’s email address, not a display name.
Verify 2FA compatibility — if Two-Step Verification is enabled, confirm the API token was generated under Personal Settings → API Tokens, not via a password-based approach.
Re-authenticate — update the token in the Bitbucket integration settings in Garth and re-link with a freshly generated token.
Was this page helpful?
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Garth","description":"Garth is an AI-powered code review agent that helps developers write better code by providing intelligent, context-aware feedback on pull requests.","colors":{"primary":"#7C3AED","light":"#1da6c8","dark":"#7C3AED"},"logo":{"light":"https://mintcdn.com/na-f445b234/lt6qWs3cfIZ6qzJc/logo/garth_light.png?fit=max\u0026auto=format\u0026n=lt6qWs3cfIZ6qzJc\u0026q=85\u0026s=95e855e51923c062bb16147c7d2152dc","dark":"https://mintcdn.com/na-f445b234/lt6qWs3cfIZ6qzJc/logo/garth_dark.png?fit=max\u0026auto=format\u0026n=lt6qWs3cfIZ6qzJc\u0026q=85\u0026s=f86b242f151f5f53c310361ba2edf25d"},"favicon":"https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/logo/garth.png?fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=a0fd59aaee435e6798b7b2a25408f80d","background":{"decoration":"grid"},"navbar":{"primary":{"type":"button","label":"Support","href":"mailto:supports@darner.ai"}},"footer":{"socials":{"linkedin":"https://linkedin.com/company/darnerai"},"links":[{"header":"Company","items":[{"label":"Darner","href":"https://darner.ai/"},{"label":"HeyGarth","href":"https://heygarth.ai/"}]},{"header":"Products","items":[{"label":"G360","href":"https://heygarth.ai/"},{"label":"GReview","href":"https://heygarth.ai/"},{"label":"GScan","href":"https://heygarth.ai/"},{"label":"GAssist","href":"https://heygarth.ai/"}]}]},"icons":{"library":"fontawesome"},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"na-f445b234","hasAudioNarration":false,"actualSubdomain":"na-f445b234","customDomains":["docs.heygarth.ai"],"gitSource":{"type":"github","owner":"7thsense-dev","repo":"garth-docs-mintlify","deployBranch":"master","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6aec14a2b01e90649e52d4fa","clientVersion":"0.0.4102","searchFilterCounts":[{"language":"default","tag":"G360","count":162},{"language":"default","tag":"Garth","count":33},{"language":"default","tag":"Integrations","count":27},{"language":"default","tag":"Administration","count":22},{"language":"default","tag":"GAssist","count":10},{"language":"default","tag":"Single Sign-On (SSO)","count":9},{"language":"default","tag":"Settings","count":7},{"language":"default","tag":"Identity Providers","count":7},{"language":"default","tag":"Getting Started","count":6},{"language":"default","tag":"Bring your own key","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"setup/bitbucket","slug":"/setup/bitbucket","pageMetadata":{"title":"Bitbucket","description":"Connect Garth to your Bitbucket Cloud repositories for AI-driven pull request reviews and inline code feedback.","icon":"/logo/git/bitbucket.svg","href":"/setup/bitbucket"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Connect Garth to your Bitbucket Cloud repositories for AI-driven pull request reviews and inline code feedback.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,Frame,Heading,Info,OptimizedImage,Step,Steps,Table,Warning}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Garth enhances your Bitbucket Cloud workflow with:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Real-time pull request checks`}),` — immediate scanning of new PRs.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Inline feedback`}),` — actionable suggestions attached directly to your diffs.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Automatic webhooks`}),` — event-driven architecture with no manual webhook setup required.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`step-1-create-the-integration-account`,children:`Step 1: Create the integration account`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Create a `,_jsx(_components.strong,{children:`dedicated Bitbucket service account`}),` for Garth rather than binding\nthe integration to a personal account. Code reviews will be attributed to this\naccount.`]})}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Register the account`,children:_jsx(_components.p,{children:`Log out of your personal Bitbucket account and create a new user specifically for this integration.`})}),_jsx(Step,{title:`Finalize the profile`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Set the username to something identifiable, such as `,_jsx(_components.code,{children:`GPRABot`}),`. - Use a team\nalias email rather than a personal address. - Enable Two-Step Verification\n(2FA) if required by your company policy.`]}),`\n`]})}),_jsx(Step,{title:`Associate with your workspace`,children:_jsxs(_components.p,{children:[`Add the new service account to your primary Bitbucket workspace and grant it at minimum `,_jsx(_components.code,{children:`Developer`}),` access on the projects you want Garth to analyze.`]})})]}),`\n`,_jsx(Info,{children:_jsx(_components.p,{children:`When you rotate the service account later, update the token in Garth and\nre-enable repository tracking — no other reconfiguration is needed.`})}),`\n`,_jsx(Heading,{level:`2`,id:`step-2-create-an-api-token`,children:`Step 2: Create an API token`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Authenticate as the service account`,children:_jsx(_components.p,{children:`Ensure you are logged into Bitbucket using the dedicated Garth service account.`})}),_jsx(Step,{title:`Open API token settings`,children:_jsxs(_components.p,{children:[`Go to `,_jsx(_components.strong,{children:`Personal settings`}),` and select `,_jsx(_components.strong,{children:`API Tokens`}),` under the Access\nManagement section.`]})}),_jsx(Step,{title:`Create the token`,children:_jsxs(_components.p,{children:[`Click `,_jsx(_components.strong,{children:`Create token`}),` and give it a descriptive label such as `,_jsx(_components.code,{children:`Garth PR Token`}),`.`]})}),_jsxs(Step,{title:`Select token scopes`,children:[_jsx(_components.p,{children:`Grant the following permissions:`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Access`}),_jsx(_components.th,{children:`Scopes`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Read`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`read:repository:bitbucket`}),` `,_jsx(_components.code,{children:`read:pullrequest:bitbucket`}),` `,_jsx(_components.code,{children:`read:webhook:bitbucket`}),` `,_jsx(_components.code,{children:`read:workspace:bitbucket`}),` `,_jsx(_components.code,{children:`read:user:bitbucket`}),` `,_jsx(_components.code,{children:`read:account`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Write`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`write:repository:bitbucket`}),` `,_jsx(_components.code,{children:`write:pullrequest:bitbucket`}),` `,_jsx(_components.code,{children:`write:webhook:bitbucket`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Admin`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`admin:repository:bitbucket`}),` `,_jsx(_components.code,{children:`admin:workspace:bitbucket`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Delete`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`delete:webhook:bitbucket`})})]})]})]})]}),_jsx(Step,{title:`Save the token`,children:_jsxs(_components.p,{children:[`Copy the token immediately after creation — `,_jsx(_components.strong,{children:`Bitbucket displays it only once`}),`. Store it in a secure location.`]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`step-3-link-to-garth`,children:`Step 3: Link to Garth`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Open Garth integrations`,children:_jsxs(_components.p,{children:[`Log into the `,_jsx(_components.a,{href:`https://app.heygarth.ai/`,children:`Garth dashboard`}),` and navigate to `,_jsx(_components.a,{href:`https://app.heygarth.ai/settings/integrations`,children:`Settings → Integrations`}),`.`]})}),_jsxs(Step,{title:`Bind the token`,children:[_jsxs(_components.p,{children:[`Select the `,_jsx(_components.strong,{children:`Bitbucket`}),` tab. Enter your `,_jsx(_components.strong,{children:`Bitbucket URL`}),`\n(`,_jsx(_components.code,{children:`https://bitbucket.org/your-workspace`}),`), `,_jsx(_components.strong,{children:`Username`}),` (the service account’s\nemail), and `,_jsx(_components.strong,{children:`Personal Access Token`}),`, then click `,_jsx(_components.strong,{children:`Validate`}),`.`]}),_jsx(Frame,{caption:`Enter your Bitbucket URL, username, and Personal Access Token, then click Validate`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/bitbucket_PAT_integration.png?fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=c1614076fee4b770352f007a7e3504c4`,alt:`Bitbucket integration settings showing token validation`,\"data-og-width\":`925`,width:`925`,\"data-og-height\":`753`,height:`753`,\"data-path\":`images/setup/bitbucket_PAT_integration.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/bitbucket_PAT_integration.png?w=280\u0026fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=55e73483dbb3bbf841143c976ee23b17 280w, https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/bitbucket_PAT_integration.png?w=560\u0026fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=803691ef76d44f74ad38178c20930009 560w, https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/bitbucket_PAT_integration.png?w=840\u0026fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=2d01f3a5c02ce55d6d73861b6b59d7f7 840w, https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/bitbucket_PAT_integration.png?w=1100\u0026fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=b6032bfce2fdd06c73f4651e9d0e16ec 1100w, https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/bitbucket_PAT_integration.png?w=1650\u0026fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=7e884943f578913775fdc1ccff75a7ec 1650w, https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/bitbucket_PAT_integration.png?w=2500\u0026fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=c5ed6378e2c7f4db150f5b66658cae2b 2500w`})})]}),_jsxs(Step,{title:`Install repositories`,children:[_jsxs(_components.p,{children:[`After validation, select the repositories you want Garth to review and click `,_jsx(_components.strong,{children:`Install Repositories`}),`.`]}),_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Automatic webhooks:`}),` Garth installs webhooks on selected repositories automatically. No manual webhook configuration is required. Webhooks are also removed automatically when you uninstall a repository.`]})}),_jsx(Frame,{caption:`Select the repositories you want Garth to review and click Install Repositories`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/bitbucket_integration.png?fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=c5e3a4848559740194d64229322db17c`,alt:`Bitbucket integration settings showing repository selection and Install Repositories button`,\"data-og-width\":`943`,width:`943`,\"data-og-height\":`767`,height:`767`,\"data-path\":`images/setup/bitbucket_integration.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/bitbucket_integration.png?w=280\u0026fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=72427001ce5eee96d930874685e5a6c8 280w, https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/bitbucket_integration.png?w=560\u0026fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=aa6c3d4addb336b56a89f764d2ea4136 560w, https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/bitbucket_integration.png?w=840\u0026fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=08e282fb24189778b57042deb9049b52 840w, https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/bitbucket_integration.png?w=1100\u0026fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=68f11424bf63ccb0bba74211678decf9 1100w, https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/bitbucket_integration.png?w=1650\u0026fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=f013e3972d7d470ab1458f9ca98405da 1650w, https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/bitbucket_integration.png?w=2500\u0026fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=dd939ae011779c8f7389eca89b07608c 2500w`})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`step-4-activate-and-configure-the-repository`,children:`Step 4: Activate and configure the repository`}),`\n`,_jsxs(_components.p,{children:[`After installation, activate each repository under `,_jsx(_components.a,{href:`https://app.heygarth.ai/agents/pr-review/repository-setup`,children:`Agent Setup → PR Review → Repository Setup`}),`.`]}),`\n`,_jsx(_components.p,{children:`Once a repository is activated, you can configure the following options:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Files to Exclude`}),` — specify file patterns that Garth should skip during reviews.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Source Branches to Exclude`}),` — exclude PRs originating from certain branches.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Destination Branches to Exclude`}),` — exclude PRs targeting certain branches.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Auto Review`}),` — enable or disable automatic reviews for new PRs on this repository.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Repository PR Review Guidelines`}),` — define custom review guidelines specific to this repository.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`troubleshooting`,children:`Troubleshooting`}),`\n`,_jsxs(AccordionGroup,{children:[_jsxs(Accordion,{title:`Webhook issues`,id:`webhook-issues`,children:[_jsx(_components.p,{children:`If Garth is not accessing repositories or reviewing pull requests:`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Check webhook status`}),` — go to your Bitbucket repository settings and verify the Garth webhook exists and is active.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Manually delete the webhook`}),` if it exists but is not working.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Refresh the repository page`}),` in the Garth app.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Reinstall the webhook`}),` — uninstall and reinstall the repository from the Garth dashboard.`]}),`\n`]})]}),_jsxs(Accordion,{title:`Installation problems`,id:`installation-problems`,children:[_jsx(_components.p,{children:`If you cannot install Garth on a repository:`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Verify workspace membership`}),` — confirm the service account is in the Bitbucket workspace with at least `,_jsx(_components.code,{children:`Developer`}),` access.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Check token scopes`}),` — confirm all required scopes (especially `,_jsx(_components.code,{children:`admin:workspace:bitbucket`}),` and `,_jsx(_components.code,{children:`write:repository:bitbucket`}),`) are granted.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Re-validate the token`}),` — go to `,_jsx(_components.strong,{children:`Settings → Integrations → Bitbucket`}),` in Garth and re-enter your credentials.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Toggle the repository`}),` — uninstall and reinstall the repository from the Garth app to force a fresh webhook setup.`]}),`\n`]})]}),_jsxs(Accordion,{title:`Not receiving reviews`,id:`not-receiving-reviews`,children:[_jsx(_components.p,{children:`If Garth is installed but you are not receiving any reviews on your pull requests:`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Check repository activation`}),` — go to `,_jsx(_components.a,{href:`https://app.heygarth.ai/agents/pr-review/repository-setup`,children:`Agent Setup → PR Review → Repository Setup`}),` and confirm the repository is activated.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Verify Auto Review is enabled`}),` — ensure the `,_jsx(_components.strong,{children:`Auto Review`}),` toggle is turned on for the repository.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Check branch exclusions`}),` — confirm the source or destination branch of your PR is not listed under `,_jsx(_components.strong,{children:`Source Branches to Exclude`}),` or `,_jsx(_components.strong,{children:`Destination Branches to Exclude`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Check file exclusions`}),` — verify that the files changed in your PR are not covered by patterns in `,_jsx(_components.strong,{children:`Files to Exclude`}),`.`]}),`\n`]})]}),_jsxs(Accordion,{title:`Authentication errors`,id:`authentication-errors`,children:[_jsx(_components.p,{children:`If you receive authentication or permission errors:`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Check token expiry`}),` — Bitbucket API tokens can expire; regenerate and update the token in Garth if needed.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Confirm the username field`}),` — the `,_jsx(_components.strong,{children:`Username`}),` entered during setup must be the service account’s email address, not a display name.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Verify 2FA compatibility`}),` — if Two-Step Verification is enabled, confirm the API token was generated under `,_jsx(_components.strong,{children:`Personal Settings → API Tokens`}),`, not via a password-based approach.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Re-authenticate`}),` — update the token in the Bitbucket integration settings in Garth and re-link with a freshly generated token.`]}),`\n`]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Bitbucket","description":"Connect Garth to your Bitbucket Cloud repositories for AI-driven pull request reviews and inline code feedback.","icon":"/logo/git/bitbucket.svg","href":"/setup/bitbucket"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Step 1: Create the integration account","slug":"step-1-create-the-integration-account","depth":2,"children":[]},{"title":"Step 2: Create an API token","slug":"step-2-create-an-api-token","depth":2,"children":[]},{"title":"Step 3: Link to Garth","slug":"step-3-link-to-garth","depth":2,"children":[]},{"title":"Step 4: Activate and configure the repository","slug":"step-4-activate-and-configure-the-repository","depth":2,"children":[]},{"title":"Troubleshooting","slug":"troubleshooting","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"na-f445b234","siteName":"Garth","title":"Bitbucket - Garth","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-03T07:55:12.756Z","originalFileLocation":"setup/bitbucket.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Connect Garth to your Bitbucket Cloud repositories for AI-driven pull request reviews and inline code feedback.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Garth\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/na-f445b234/IJ6e1UQ4wDHrJjJH/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/na-f445b234/IJ6e1UQ4wDHrJjJH/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/na-f445b234/IJ6e1UQ4wDHrJjJH/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/na-f445b234/IJ6e1UQ4wDHrJjJH/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/na-f445b234/IJ6e1UQ4wDHrJjJH/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/na-f445b234/IJ6e1UQ4wDHrJjJH/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/na-f445b234/IJ6e1UQ4wDHrJjJH/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/na-f445b234/IJ6e1UQ4wDHrJjJH/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/na-f445b234/IJ6e1UQ4wDHrJjJH/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Bitbucket - Garth\">\u003cmeta data-mint-head property=\"og:description\" content=\"Connect Garth to your Bitbucket Cloud repositories for AI-driven pull request reviews and inline code feedback.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Garth\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.heygarth.ai/setup/bitbucket\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://na-f445b234.mintlify.site/_mintlify/api/og/v2?division=Set+up+your+repository\u0026amp;title=Bitbucket\u0026amp;description=Connect+Garth+to+your+Bitbucket+Cloud+repositories+for+AI-driven+pull+request+reviews+and+inline+code+feedback.\u0026amp;theme=f6818c8f2129b8c847831b3c\u0026amp;signature=25d1917ef3413b47e7219e2ce015da18e4124d8c3e64c71337c51bee9116aa63\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Bitbucket - Garth\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Connect Garth to your Bitbucket Cloud repositories for AI-driven pull request reviews and inline code feedback.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://na-f445b234.mintlify.site/_mintlify/api/og/v2?division=Set+up+your+repository\u0026amp;title=Bitbucket\u0026amp;description=Connect+Garth+to+your+Bitbucket+Cloud+repositories+for+AI-driven+pull+request+reviews+and+inline+code+feedback.\u0026amp;theme=f6818c8f2129b8c847831b3c\u0026amp;signature=25d1917ef3413b47e7219e2ce015da18e4124d8c3e64c71337c51bee9116aa63\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/na-f445b234/IJ6e1UQ4wDHrJjJH/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Garth\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#7C3AED\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.heygarth.ai/setup/bitbucket\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/setup/bitbucket.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.heygarth.ai/#organization\",\"name\":\"Garth\",\"url\":\"https://docs.heygarth.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/na-f445b234/lt6qWs3cfIZ6qzJc/logo/garth_light.png?fit=max\u0026auto=format\u0026n=lt6qWs3cfIZ6qzJc\u0026q=85\u0026s=95e855e51923c062bb16147c7d2152dc\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.heygarth.ai#website\",\"name\":\"Garth\",\"url\":\"https://docs.heygarth.ai\",\"publisher\":{\"@id\":\"https://docs.heygarth.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.heygarth.ai/setup/bitbucket#webpage\",\"url\":\"https://docs.heygarth.ai/setup/bitbucket\",\"name\":\"Bitbucket\",\"description\":\"Connect Garth to your Bitbucket Cloud repositories for AI-driven pull request reviews and inline code feedback.\",\"dateModified\":\"2026-07-03T07:55:12.756Z\",\"isPartOf\":{\"@id\":\"https://docs.heygarth.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.heygarth.ai/setup/bitbucket#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.heygarth.ai/setup/bitbucket#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Set up your repository\",\"item\":\"https://docs.heygarth.ai/setup/github-app\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Bitbucket\",\"item\":\"https://docs.heygarth.ai/setup/bitbucket\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.heygarth.ai/setup/bitbucket#article\",\"headline\":\"Bitbucket\",\"name\":\"Bitbucket\",\"description\":\"Connect Garth to your Bitbucket Cloud repositories for AI-driven pull request reviews and inline code feedback.\",\"url\":\"https://docs.heygarth.ai/setup/bitbucket\",\"mainEntityOfPage\":{\"@id\":\"https://docs.heygarth.ai/setup/bitbucket#webpage\"},\"dateModified\":\"2026-07-03T07:55:12.756Z\",\"publisher\":{\"@id\":\"https://docs.heygarth.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.heygarth.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Garth\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Garth\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/setup/bitbucket.md","siteName":"Garth","nav":{"global":null,"tabs":[{"tab":"Garth","groups":[{"group":"Get started","pages":[{"title":"Overview","icon":"hand-wave","href":"/overview"}]},{"group":"Set up your repository","pages":[{"title":"GitHub via App","sidebarTitle":"GitHub via App","icon":"https://mintlify.s3.us-west-1.amazonaws.com/na-f445b234/logo/git/github.svg","href":"/setup/github-app"},{"title":"GitHub via PAT","sidebarTitle":"GitHub via PAT","description":"Connect Garth to GitHub.com or GitHub Enterprise Server with a classic personal access token for automated code reviews.","icon":"https://mintlify.s3.us-west-1.amazonaws.com/na-f445b234/logo/git/github.svg","href":"/setup/github-pat"},{"title":"Bitbucket","icon":"https://mintlify.s3.us-west-1.amazonaws.com/na-f445b234/logo/git/bitbucket.svg","href":"/setup/bitbucket"},{"title":"GitLab","description":"Connect Garth to your GitLab.com repositories using a Group Access Token or Personal Access Token for automated code reviews.","icon":"https://mintlify.s3.us-west-1.amazonaws.com/na-f445b234/logo/git/gitlab.svg","href":"/setup/gitlab"},{"title":"Azure DevOps","icon":"https://mintlify.s3.us-west-1.amazonaws.com/na-f445b234/logo/git/azure_devops.svg","href":"/setup/azure-devops"}]},{"group":"GReview","pages":[{"title":"Features","icon":"sparkles","href":"/greview/features"},{"title":"Repository configuration","icon":"gear","href":"/greview/repository-configuration"},{"title":"Customize review","icon":"pen-to-square","href":"/greview/customize-review"}]},{"group":"GScan","pages":[{"title":"Features","icon":"sparkles","href":"/gscan/features"},{"title":"Code security","icon":"shield-check","href":"/gscan/code-security"},{"title":"Code quality","icon":"chart-line","href":"/gscan/code-quality"},{"title":"Repository configuration","icon":"gear","href":"/gscan/repository-configuration"}]},{"group":"GAssist","pages":[{"title":"Overview","icon":"wand-magic-sparkles","href":"/gassist/overview"},{"title":"Supported platforms","icon":"plug","href":"/gassist/supported-platforms"},{"group":"Connect with MS Teams","icon":"microsoft","pages":[{"title":"Getting started","sidebarTitle":"Overview","icon":"rocket","href":"/gassist/getting-started"},{"title":"Garth admin setup","sidebarTitle":"Garth admin setup","icon":"user-gear","href":"/gassist/admin-setup"},{"title":"Install in MS Teams","sidebarTitle":"Install in MS Teams","icon":"microsoft","href":"/gassist/teams-install"}]},{"group":"Connect with Slack","icon":"slack","pages":[{"title":"Getting started with Slack","sidebarTitle":"Overview","icon":"rocket","href":"/gassist/slack/getting-started"},{"title":"Garth admin setup","sidebarTitle":"Garth admin setup","icon":"user-gear","href":"/gassist/slack/admin-setup"}]},{"title":"Notifications","icon":"bell","href":"/gassist/notifications"},{"title":"PR cards","icon":"rectangle-list","href":"/gassist/pr-cards"},{"title":"Commands","icon":"terminal","href":"/gassist/commands"}]},{"group":"Bring your own key","pages":[{"title":"Bring Your Own Key","icon":"key","href":"/byok/overview"},{"title":"Claude API Tier Limits","icon":"layer-group","href":"/byok/claude-tiers"},{"title":"OpenAI Models and Usage Tiers","icon":"robot","href":"/byok/openai-models"},{"title":"Gemini Models and Rate Limits","icon":"google","href":"/byok/gemini-models"},{"title":"Sarvam AI Models and Rate Limits","icon":"https://assets.sarvam.ai/assets/brand/logos/sarvam-logo-white.svg","href":"/byok/sarvam-ai"}]},{"group":"On-prem setup","pages":[{"title":"Setup Guideline","icon":"server","href":"/on-prem-setup/setup-guideline"},{"group":"OAuth App","pages":[{"title":"GitHub","icon":"https://mintlify.s3.us-west-1.amazonaws.com/na-f445b234/logo/git/github.svg","href":"/on-prem-setup/github"},{"title":"Azure DevOps","icon":"https://mintlify.s3.us-west-1.amazonaws.com/na-f445b234/logo/git/azure_devops.svg","href":"/on-prem-setup/azure-devops"},{"title":"GitLab","icon":"https://mintlify.s3.us-west-1.amazonaws.com/na-f445b234/logo/git/gitlab.svg","href":"/on-prem-setup/gitlab"},{"title":"Bitbucket","icon":"https://mintlify.s3.us-west-1.amazonaws.com/na-f445b234/logo/git/bitbucket.svg","href":"/on-prem-setup/bitbucket"}]}]}]},{"tab":"G360","pages":[{"title":"G360","href":"/g360/configure-setup-workflow"}]}]},"basePath":"","title":"Bitbucket - Garth","buildId":"dpl_596ePT575z4qnAFksq1biRW97aLY","deploymentId":"dpl_596ePT575z4qnAFksq1biRW97aLY","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-BXrZabKK.js","DynamicMarkdown-CtasenyM.js","zoom-image-lightbox-C5F0mVLH.js","lightbox-handle-r17bVUz3.js"]}