Skip to content

docs(auth + vertex): configure GitHub App token and required env vars for Claude on Vertex AI#11

Open
moesy wants to merge 10 commits into
anthropics:mainfrom
moesy:fix/actions-permissions
Open

docs(auth + vertex): configure GitHub App token and required env vars for Claude on Vertex AI#11
moesy wants to merge 10 commits into
anthropics:mainfrom
moesy:fix/actions-permissions

Conversation

@moesy

@moesy moesy commented May 20, 2025

Copy link
Copy Markdown
  • Moved the permissions block to the top-level context as required by GitHub Actions

  • Removed unsupported permissions declarations from individual steps

  • Explicitly passed the GitHub App token (${{ steps.app-token.outputs.token }}) to anthropics/claude-code-action@beta to avoid fallback to GITHUB_TOKEN or OIDC

  • Resolved 401 Unauthorized errors during token exchange by ensuring proper authentication

  • Added required environment variables and corresponding secrets:

    • CLOUD_ML_REGION
    • ANTHROPIC_VERTEX_PROJECT_ID
  • See Claude GitHub Action requires both CLOUD_ML_REGION and model-specific region variables for Vertex AI #12 for details on model-specific region requirements (no longer required)

moesy added 2 commits May 20, 2025 06:13
- Moved `permissions` block to top-level context as required by GitHub Actions
- Removed invalid `permissions` entries from individual steps
- Resolved "App token exchange failed: 401 Unauthorized" error
- Explicitly passed the GitHub App token from `create-github-app-token@v2` to `anthropics/claude-code-action@beta` using `github_token: ${{ steps.app-token.outputs.token }}`
- Ensures Claude action uses correct token instead of defaulting to GITHUB_TOKEN or OIDC
@moesy moesy changed the title docs(readme): clarify OIDC setup for AWS Bedrock and GCP Vertex AI docs(readme): fix OIDC auth setup by clarifying GitHub App token usage May 20, 2025
moesy added 2 commits May 20, 2025 17:46
- Set CLOUD_ML_REGION and ANTHROPIC_VERTEX_PROJECT_ID. They are required environment variables when using vertex
- Created GitHub secrets VERTEX_REGION and VERTEX_PROJECT_ID to support Vertex integration
- Documented the need for both VERTEX_REGION and model-specific region overrides such as VERTEX_REGION_CLAUDE_3_7_SONNET
- Clarified that both are currently required to avoid region resolution errors
- Linked to known issue describing this behavior (anthropics#12)
@moesy moesy changed the title docs(readme): fix OIDC auth setup by clarifying GitHub App token usage fix(auth + vertex): configure GitHub App token and required env vars for Claude on Vertex AI May 21, 2025
@moesy moesy changed the title fix(auth + vertex): configure GitHub App token and required env vars for Claude on Vertex AI docs(auth + vertex): configure GitHub App token and required env vars for Claude on Vertex AI May 21, 2025

@ashwin-ant ashwin-ant left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Left a question.

Comment thread README.md Outdated
@moesy

moesy commented Jun 6, 2025

Copy link
Copy Markdown
Author

Hi @mvhatch I fixed the merge conflict. Can you review again?

D-o-d-o-x referenced this pull request in D-o-d-o-x/claude-code-gitea-action Jul 17, 2025
- Pin setup-node to commit SHA v4.4.0
- Pin setup-bun to commit SHA v2.0.2
- Pin claude-code to exact version 1.0.2 (remove ^)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants