Connect Garth to your GitLab.com repositories using a Group Access Token or Personal Access Token for automated code reviews.
Garth supports two token types for GitLab authentication. Use a Group Access Token if you are on GitLab Premium or Ultimate — it creates a managed bot user and simplifies permission management across the organization. Otherwise, use a Personal Access Token from a dedicated service account.
Option A — Group Access Token (recommended for Premium/Ultimate)
Group Access Tokens natively generate a bot user, making permission management much simpler across the organization.
1
Navigate to your group
Open the target group in the GitLab interface.
2
Open Access Token settings
In the sidebar, go to Settings → Access Tokens.
3
Generate the token
Assign Developer access and select the following scopes: api, read_api, read_repository, write_repository, read_user. Click Generate.
GitLab generates a random bot name such as group_102_bot_xyz. Group Administrators can rename the bot or update its avatar via the GitLab API to give Garth’s comments a distinct identity.
Option B — Personal Access Token (for non-Premium tiers)
Do not use a personal user account. Code reviews will be attributed to the token owner. Create a standalone service account named GPRABot exclusively for this integration.
The service account must be added to the relevant project as a Maintainer — this role is required to manage webhooks.
1
Authenticate as the service account
Log into GitLab using the dedicated Garth service account.
2
Open Access Token settings
Click your avatar → Edit Profile → Access Tokens.
3
Name the token
Give the token a clear name such as Garth Bot Key. You can optionally set an expiry date; leaving it blank defaults to 365 days. If the token expires, Garth stops functioning until you replace it in the dashboard.
4
Select token scopes
Enable the following scopes:
api
read_api
read_user
read_repository
write_repository
5
Save the token
Click Create Personal Access Token and copy the token immediately. GitLab will not display it again.
Select the GitLab tab. Enter your GitLab URL (https://gitlab.com)
and the Access Token you just created, then click Validate.
Enter your GitLab URL and 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 MR is not listed under Source Branches to Exclude or Destination Branches to Exclude.
Check file exclusions — verify that the files changed in your MR are not covered by patterns in Files to Exclude.
Authentication errors
If you receive authentication or permission errors:
Check token expiry — GitLab Personal Access Tokens expire based on the date you set (or after 365 days by default). Regenerate and update the token in Garth if it has lapsed.
Confirm the token type — use either a Group Access Token with api scope and Maintainer role, or a Personal Access Token from the dedicated service account — not a personal user account.
Verify Group Owner status — the Garth user initiating the connection must hold GitLab Group Owner status.
Re-authenticate — update the token in Settings → Integrations → GitLab within 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/gitlab","slug":"/setup/gitlab","pageMetadata":{"title":"GitLab","description":"Connect Garth to your GitLab.com repositories using a Group Access Token or Personal Access Token for automated code reviews.","icon":"/logo/git/gitlab.svg","href":"/setup/gitlab"},"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 GitLab.com repositories using a Group Access Token or Personal Access Token for automated code reviews.\"\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`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,Frame,Heading,Info,OptimizedImage,Step,Steps,Tip,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(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Garth supports two token types for GitLab authentication. Use a `,_jsx(_components.strong,{children:`Group Access Token`}),` if you are on GitLab Premium or Ultimate — it creates a managed bot user and simplifies permission management across the organization. Otherwise, use a `,_jsx(_components.strong,{children:`Personal Access Token`}),` from a dedicated service account.`]}),`\n`,_jsx(Heading,{level:`2`,id:`step-1-create-an-access-token`,children:`Step 1: Create an access token`}),`\n`,_jsxs(AccordionGroup,{children:[_jsxs(Accordion,{title:`Option A — Group Access Token (recommended for Premium/Ultimate)`,id:`option-a-group-access-token-recommended-for-premium-ultimate`,children:[_jsx(_components.p,{children:`Group Access Tokens natively generate a bot user, making permission management much simpler across the organization.`}),_jsxs(Steps,{children:[_jsx(Step,{title:`Navigate to your group`,children:_jsx(_components.p,{children:`Open the target group in the GitLab interface.`})}),_jsx(Step,{title:`Open Access Token settings`,children:_jsxs(_components.p,{children:[`In the sidebar, go to `,_jsx(_components.strong,{children:`Settings → Access Tokens`}),`.`]})}),_jsxs(Step,{title:`Generate the token`,children:[_jsxs(_components.p,{children:[`Assign `,_jsx(_components.strong,{children:`Developer`}),` access and select the following scopes: `,_jsx(_components.code,{children:`api`}),`, `,_jsx(_components.code,{children:`read_api`}),`, `,_jsx(_components.code,{children:`read_repository`}),`, `,_jsx(_components.code,{children:`write_repository`}),`, `,_jsx(_components.code,{children:`read_user`}),`. Click `,_jsx(_components.strong,{children:`Generate`}),`.`]}),_jsx(Tip,{children:_jsxs(_components.p,{children:[`GitLab generates a random bot name such as `,_jsx(_components.code,{children:`group_102_bot_xyz`}),`. Group Administrators can rename the bot or update its avatar via the GitLab API to give Garth’s comments a distinct identity.`]})})]})]})]}),_jsxs(Accordion,{title:`Option B — Personal Access Token (for non-Premium tiers)`,id:`option-b-personal-access-token-for-non-premium-tiers`,children:[_jsx(Warning,{children:_jsxs(_components.p,{children:[`Do not use a personal user account. Code reviews will be attributed to the token owner. Create a standalone service account named `,_jsx(_components.code,{children:`GPRABot`}),` exclusively for this integration.`]})}),_jsx(Info,{children:_jsxs(_components.p,{children:[`The service account must be added to the relevant project as a `,_jsx(_components.strong,{children:`Maintainer`}),` — this role is required to manage webhooks.`]})}),_jsxs(Steps,{children:[_jsx(Step,{title:`Authenticate as the service account`,children:_jsx(_components.p,{children:`Log into GitLab using the dedicated Garth service account.`})}),_jsx(Step,{title:`Open Access Token settings`,children:_jsxs(_components.p,{children:[`Click your avatar → `,_jsx(_components.strong,{children:`Edit Profile`}),` → `,_jsx(_components.strong,{children:`Access Tokens`}),`.`]})}),_jsx(Step,{title:`Name the token`,children:_jsxs(_components.p,{children:[`Give the token a clear name such as `,_jsx(_components.code,{children:`Garth Bot Key`}),`. You can optionally set an expiry date; leaving it blank defaults to 365 days. If the token expires, Garth stops functioning until you replace it in the dashboard.`]})}),_jsxs(Step,{title:`Select token scopes`,children:[_jsx(_components.p,{children:`Enable the following scopes:`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`api`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`read_api`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`read_user`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`read_repository`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`write_repository`})}),`\n`]})]}),_jsx(Step,{title:`Save the token`,children:_jsxs(_components.p,{children:[`Click `,_jsx(_components.strong,{children:`Create Personal Access Token`}),` and copy the token immediately. `,_jsx(_components.strong,{children:`GitLab will not display it again.`})]})})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`step-2-link-to-garth`,children:`Step 2: 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:`GitLab`}),` tab. Enter your `,_jsx(_components.strong,{children:`GitLab URL`}),` (`,_jsx(_components.code,{children:`https://gitlab.com`}),`)\nand the `,_jsx(_components.strong,{children:`Access Token`}),` you just created, then click `,_jsx(_components.strong,{children:`Validate`}),`.`]}),_jsx(Frame,{caption:`Enter your GitLab URL and Access Token, then click Validate`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/gitlab_PAT_integration.png?fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=1a39712fe2a50aff776a2c810116b70c`,alt:`GitLab integration settings showing token validation`,\"data-og-width\":`922`,width:`922`,\"data-og-height\":`627`,height:`627`,\"data-path\":`images/setup/gitlab_PAT_integration.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/gitlab_PAT_integration.png?w=280\u0026fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=a3e81b399c56706d1fb0524df8b5571c 280w, https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/gitlab_PAT_integration.png?w=560\u0026fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=e7eeb6f06fd117ae04a237d329e99a52 560w, https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/gitlab_PAT_integration.png?w=840\u0026fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=acf2c0fde82a1d6216fa000aa4cf3e10 840w, https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/gitlab_PAT_integration.png?w=1100\u0026fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=8453db9f51810dfa91e36faa2a7740d3 1100w, https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/gitlab_PAT_integration.png?w=1650\u0026fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=4ec1839c125a6ca98014d6c7d32cf9e7 1650w, https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/gitlab_PAT_integration.png?w=2500\u0026fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=7a8714d1e60537adc90deb3164616def 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/gitlab_integration.png?fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=80ae0c0a7e04d57b2a18b36090ec695e`,alt:`GitLab integration settings showing repository selection and Install Repositories button`,\"data-og-width\":`940`,width:`940`,\"data-og-height\":`837`,height:`837`,\"data-path\":`images/setup/gitlab_integration.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/gitlab_integration.png?w=280\u0026fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=d84b06ae141005f11d176e5f9c5c1f3d 280w, https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/gitlab_integration.png?w=560\u0026fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=0daf01d3cc9e23bbd465bca6bb9bed26 560w, https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/gitlab_integration.png?w=840\u0026fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=42030fb4a6981083f52cb14036cc6e65 840w, https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/gitlab_integration.png?w=1100\u0026fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=fddb978402a9d55640e0548167ca3f37 1100w, https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/gitlab_integration.png?w=1650\u0026fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=97fb2b9d238eb2bb1dab2eead20b7eb8 1650w, https://mintcdn.com/na-f445b234/LGmp_ZNmd7sA8i8z/images/setup/gitlab_integration.png?w=2500\u0026fit=max\u0026auto=format\u0026n=LGmp_ZNmd7sA8i8z\u0026q=85\u0026s=cecb648102392ae511c3f07e36784ad9 2500w`})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`step-3-activate-and-configure-the-repository`,children:`Step 3: 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 MRs originating from certain branches.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Destination Branches to Exclude`}),` — exclude MRs targeting certain branches.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Auto Review`}),` — enable or disable automatic reviews for new MRs 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 merge requests:`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Check webhook status`}),` — go to the project’s settings in GitLab under `,_jsx(_components.strong,{children:`Webhooks`}),` 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`}),` — untoggle and re-toggle the repository in 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 group/project membership`}),` — the service account must hold at least `,_jsx(_components.code,{children:`Maintainer`}),` access to the target project to manage webhooks.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Check token scopes`}),` — confirm all required scopes (`,_jsx(_components.code,{children:`api`}),`, `,_jsx(_components.code,{children:`read_api`}),`, `,_jsx(_components.code,{children:`read_user`}),`, `,_jsx(_components.code,{children:`read_repository`}),`, `,_jsx(_components.code,{children:`write_repository`}),`) are present on the token.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Re-validate the token`}),` — go to `,_jsx(_components.strong,{children:`Settings → Integrations → GitLab`}),` 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 merge 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 MR 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 MR 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`}),` — GitLab Personal Access Tokens expire based on the date you set (or after 365 days by default). Regenerate and update the token in Garth if it has lapsed.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Confirm the token type`}),` — use either a `,_jsx(_components.strong,{children:`Group Access Token`}),` with `,_jsx(_components.code,{children:`api`}),` scope and `,_jsx(_components.code,{children:`Maintainer`}),` role, or a `,_jsx(_components.strong,{children:`Personal Access Token`}),` from the dedicated service account — not a personal user account.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Verify Group Owner status`}),` — the Garth user initiating the connection must hold GitLab Group Owner status.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Re-authenticate`}),` — update the token in `,_jsx(_components.strong,{children:`Settings → Integrations → GitLab`}),` within 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":"GitLab","description":"Connect Garth to your GitLab.com repositories using a Group Access Token or Personal Access Token for automated code reviews.","icon":"/logo/git/gitlab.svg","href":"/setup/gitlab"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Step 1: Create an access token","slug":"step-1-create-an-access-token","depth":2,"children":[]},{"title":"Step 2: Link to Garth","slug":"step-2-link-to-garth","depth":2,"children":[]},{"title":"Step 3: Activate and configure the repository","slug":"step-3-activate-and-configure-the-repository","depth":2,"children":[]},{"title":"Troubleshooting","slug":"troubleshooting","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"na-f445b234","siteName":"Garth","title":"GitLab - Garth","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-03-23T06:06:26.922Z","originalFileLocation":"setup/gitlab.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 GitLab.com repositories using a Group Access Token or Personal Access Token for automated code reviews.\">\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=\"GitLab - Garth\">\u003cmeta data-mint-head property=\"og:description\" content=\"Connect Garth to your GitLab.com repositories using a Group Access Token or Personal Access Token for automated code reviews.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Garth\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.heygarth.ai/setup/gitlab\">\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=GitLab\u0026amp;description=Connect+Garth+to+your+GitLab.com+repositories+using+a+Group+Access+Token+or+Personal+Access+Token+for+automated+code+reviews.\u0026amp;theme=f6818c8f2129b8c847831b3c\u0026amp;signature=f331a2232875839fd438358811a9e4a35e049662189e609948e5e266a90aef9b\">\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=\"GitLab - Garth\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Connect Garth to your GitLab.com repositories using a Group Access Token or Personal Access Token for automated code reviews.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://na-f445b234.mintlify.site/_mintlify/api/og/v2?division=Set+up+your+repository\u0026amp;title=GitLab\u0026amp;description=Connect+Garth+to+your+GitLab.com+repositories+using+a+Group+Access+Token+or+Personal+Access+Token+for+automated+code+reviews.\u0026amp;theme=f6818c8f2129b8c847831b3c\u0026amp;signature=f331a2232875839fd438358811a9e4a35e049662189e609948e5e266a90aef9b\">\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/gitlab\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/setup/gitlab.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/gitlab#webpage\",\"url\":\"https://docs.heygarth.ai/setup/gitlab\",\"name\":\"GitLab\",\"description\":\"Connect Garth to your GitLab.com repositories using a Group Access Token or Personal Access Token for automated code reviews.\",\"dateModified\":\"2026-03-23T06:06:26.922Z\",\"isPartOf\":{\"@id\":\"https://docs.heygarth.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.heygarth.ai/setup/gitlab#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.heygarth.ai/setup/gitlab#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Set up your repository\",\"item\":\"https://docs.heygarth.ai/setup/github-app\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"GitLab\",\"item\":\"https://docs.heygarth.ai/setup/gitlab\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.heygarth.ai/setup/gitlab#article\",\"headline\":\"GitLab\",\"name\":\"GitLab\",\"description\":\"Connect Garth to your GitLab.com repositories using a Group Access Token or Personal Access Token for automated code reviews.\",\"url\":\"https://docs.heygarth.ai/setup/gitlab\",\"mainEntityOfPage\":{\"@id\":\"https://docs.heygarth.ai/setup/gitlab#webpage\"},\"dateModified\":\"2026-03-23T06:06:26.922Z\",\"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/gitlab.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","icon":"https://mintlify.s3.us-west-1.amazonaws.com/na-f445b234/logo/git/github.svg","href":"/setup/github-pat"},{"title":"Bitbucket","description":"Connect Garth to your Bitbucket Cloud repositories for AI-driven pull request reviews and inline code feedback.","icon":"https://mintlify.s3.us-west-1.amazonaws.com/na-f445b234/logo/git/bitbucket.svg","href":"/setup/bitbucket"},{"title":"GitLab","icon":"https://mintlify.s3.us-west-1.amazonaws.com/na-f445b234/logo/git/gitlab.svg","href":"/setup/gitlab"},{"title":"Azure DevOps","description":"Connect Garth to your Azure DevOps pipeline using a Personal Access Token for intelligent, automated pull request analysis.","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":"GitLab - 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"]}