gaccode就是个毒瘤,千万不要用!用了就阴魂不散!(附彻底清楚它的方法)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔐 Authentication Required
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 Opening browser for authentication...
💡 If authentication completes automatically, you're all set!
Otherwise, visit this URL manually:
⌨️ After manual authentication, you'll receive a code
📝 Paste the code below and press Enter:
清除方法:
你看到的 gaccode.com 并不是藏在某个本地配置文件里,而是你安装的是“GAC Claude Code 镜像版”,它的核心包(https://gaccode.com/claudecode/install)内部硬编码了 gaccode.com 作为 API 中继,任何环境变量或本地 JSON 都无法覆盖
。
✅ 如何确认
在终端执行:
bash
复制
npm list -g --depth=0 | grep claude
如果输出类似
└── https://gaccode.com/claudecode/install@x.x.x
说明你装的是 镜像版(gaccode 定制),它强制使用 gaccode.com/oauth。
✅ 解决办法
方案 B:彻底卸载镜像版,换回官方 CLI(可自定义 Base URL)
bash
复制
1. 卸载镜像版
npm uninstall -g @anthropic-ai/claude-code
npm uninstall -g https://gaccode.com/claudecode/install
2. 确认卸载干净
which claude # 应为空
npm list -g | grep claude # 应无输出
如何出现:/Users/XX/.npm-global/bin/claude
说明它是 npm 全局安装 的,而不是 dmg 应用。但仍可能是 gaccode 镜像包(内部重定向到 gaccode.com)。
直接清除它!
✅ 立即验证:看包名和来源
执行:
bash
复制
npm list -g --depth=0 | grep claude
如果输出中含有 gaccode.com 或 @gaccode/claude-code,就是镜像版。
如果输出为 @anthropic-ai/claude-code@0.2.x,才是官方 CLI。
✅ 处理步骤
- 卸载当前版本(无论镜像还是官方)
bash
npm uninstall -g @anthropic-ai/claude-code
npm uninstall -g @gaccode/claude-code
保险起见,把可能的镜像地址也清理
npm uninstall -g https://gaccode.com/claudecode/install
- 确认卸载干净
bash
复制
which claude # 应该无输出
- 安装:
推荐用这个:
https://www.aicodemirror.com/register?invitecode=49QBC2

浙公网安备 33010602011771号