Answer: The fastest way is to add a masked CI/CD variable ANTHROPIC_API_KEY and add a minimal Claude job to your .gitlab-ci.yml, then test by running the job manually from CI/CD → Pipelines or triggering it from an MR. For production, a manual setup is recommended, configuring provider access and project credentials for GitLab API operations. Status: Confirmed Entry: tool/claude-code/integrations/gitlab-cicd-setup Revision: 2 Digest: sha256:f6b7d94e8b316f77 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:04:16Z Last changed: 2026-11-19T12:16:33Z (PAT variable: — → GITLAB_ACCESS_TOKEN) Last verified: 2026-11-20T12:20:59Z Next check: 2026-11-21T12:20:59Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of API key variable | ANTHROPIC_API_KEY | [1] | 2026-11-20 Job image | node:24-alpine3.21 | [1] | 2026-11-20 Install command | curl -fsSL https://claude.ai/install.sh | bash | [1] | 2026-11-20 Permission mode | acceptEdits | [1] | 2026-11-20 Allowed tools | Bash Read Edit Write mcp__gitlab | [1] | 2026-11-20 Default GitLab token | CI_JOB_TOKEN | [1] | 2026-11-20 PAT variable | GITLAB_ACCESS_TOKEN | [1] | 2026-11-20 Sources: [1] Anthropic. "Claude Code GitLab CI/CD". https://code.claude.com/docs/en/gitlab-ci-cd.md Role: primary. Accessed: 2026-11-20T12:20:59Z Quote: "Add `ANTHROPIC_API_KEY` (masked, protected as needed)" (Supports: API key variable) Quote: "image: node:24-alpine3.21" (Supports: Job image) Quote: "curl -fsSL https://claude.ai/install.sh | bash" (Supports: Install command) Quote: "--permission-mode acceptEdits" (Supports: Permission mode) Quote: "--allowedTools "Bash Read Edit Write mcp__gitlab"" (Supports: Allowed tools) Quote: "Use `CI_JOB_TOKEN` by default, or create a Project Access Token with `api` scope" (Supports: Default GitLab token) Quote: "Store as `GITLAB_ACCESS_TOKEN` (masked) if using a PAT" (Supports: PAT variable) Published: 2026-11-20T03:10:58Z Snapshot SHA-256: 0511eaba5a9b283724ccfdd0e421e54491f7a90e0494f7e5df3d5c8d3728a69a (captured 2026-11-19T12:16:34Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. Cross-check: not-available at 2026-11-20T12:20:59Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:20:59Z Last attempt: 2026-11-20T12:20:59Z Notes and limitations: Extracted automatically from a single official source (section "Setup"). Related: https://latestn.com/tool/claude-code/integrations/install-capture-hook How do I install the capture hook on my test runner for Claude Code self-hosted environment testing? https://latestn.com/tool/claude-code/integrations/manage-code-review-repositories How do I add repositories or turn off Code Review for a repository in Claude? https://latestn.com/tool/claude-code/integrations/mcp-server-sign-in How do I connect an MCP server that requires sign-in in Claude Code? https://latestn.com/tool/claude-code/integrations/github-actions-oidc-cloud-setup How do I set up OIDC authentication so Claude Code GitHub Actions can access my cloud provider without storing long-lived credentials? https://latestn.com/tool/claude-code/integrations/github-trigger-events Which GitHub events can trigger a Claude Code scheduled task? https://latestn.com/tool/claude-code/integrations/gitlab-bedrock-google-cloud How do I configure Claude Code to use Amazon Bedrock or Google Cloud in GitLab CI/CD? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-19T12:16:33Z | changed | PAT variable: — → GITLAB_ACCESS_TOKEN | [1] 2026-11-19T12:16:33Z | changed | Default GitLab token: — → CI_JOB_TOKEN | [1] 2026-11-19T12:16:33Z | changed | GitLab token variable: GITLAB_ACCESS_TOKEN → — | [1] 2026-11-19T12:16:33Z | changed | Default prompt: Review this MR and implement the requested changes → — | [1] 2026-11-13T03:04:16Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/integrations/gitlab-cicd-setup/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/integrations/gitlab-cicd-setup POST: https://latestn.com/dispute/tool/claude-code/integrations/gitlab-cicd-setup with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/integrations/gitlab-cicd-setup?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I set up Claude Code with GitLab CI/CD? Revision 2, last verified 2026-11-20T12:20:59Z. https://latestn.com/tool/claude-code/integrations/gitlab-cicd-setup (accessed 2026-11-21T09:52:46Z). @misc{LatestN_tool_claude_code_integrations_gitlab_cicd_setup_r2, title = {How do I set up Claude Code with GitLab CI/CD?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/integrations/gitlab-cicd-setup}}, note = {Revision 2; digest sha256:f6b7d94e8b316f77; last verified 2026-11-20T12:20:59Z; accessed 2026-11-21T09:52:46Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/integrations/gitlab-cicd-setup