GitHub App Installation Blocked: Unexpected ANTHROPIC_API_KEY Secret Conflict
Resolved 💬 9 comments Opened Jun 30, 2025 by 5hirish Closed Jul 17, 2025
Bug Description
I have successfully installed Claude Code in one of my Github repositories using /install-github-app. Except when I go to install it to my second repository using the same /install-github-app it unexpectedly informs me that -
_"ANTHROPIC_API_KEY already exists in repository secrets!"_ and automatically skips to _"Create a new secret with a different name"_
There main issue here is -
- I don't have an
ANTHROPIC_API_KEYsecret in my repository (Confirmed viagh secret list --repo username/repo | grep ANTHROPIC_API_KEY) - Even if it thinks so, it doesn't even allow me to select the option _"Use the existing API key"_ (Probably skips this option because of 1)
I am not sure how to resolve this. I am stuck in a loop. And I can access the value of my ANTHROPIC_API_KEY or create a new API Key from API Console since the "Claude Code" Workspace doesn't allow it.
Environment Info
- Platform: darwin
- Terminal: cursor
- Version: 1.0.35
- Feedback ID: 3402973b-2fc3-45b0-94c7-b91b0685ae9a
Errors
[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n at genericNodeError (node:internal/errors:983:15)\n at wrappedFn (node:internal/errors:537:14)\n at checkExecSyncError (node:child_process:882:11)\n at execSync (node:child_process:954:15)\n at TZ (file:///Users/work/.nvm/versions/node/v23.9.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:700:3921)\n at file:///Users/work/.nvm/versions/node/v23.9.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:622:9014\n at Q (file:///Users/work/.nvm/versions/node/v23.9.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:526:17199)\n at VX (file:///Users/work/.nvm/versions/node/v23.9.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:622:8160)\n at nS (file:///Users/work/.nvm/versions/node/v23.9.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:622:7241)\n at f9 (file:///Users/work/.nvm/versions/node/v23.9.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:622:11408)","timestamp":"2025-06-30T19:35:51.756Z"},{"error":"Error: 1: ENOENT \n at ux6 (file:///Users/work/.nvm/versions/node/v23.9.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1325:4797)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async mx6 (file:///Users/work/.nvm/versions/node/v23.9.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1325:2578)","timestamp":"2025-06-30T19:35:54.024Z"}]
Claude CLI Diagnostic
Currently running: npm-global (1.0.35)
Path: /Users/work/.nvm/versions/node/v23.9.0/bin/node
Invoked: /Users/work/.nvm/versions/node/v23.9.0/bin/claude
Auto-updates: No
Config install method: unknown
Config auto-updates: true
Update permissions: Yes
Recommendation: Run '/migrate-installer' to enable auto-updates
This migrates to a local installation in ~/.claude/localThis issue has 9 comments on GitHub. Read the full discussion on GitHub ↗