Claude Code 无法连接到 Anthropic 服务
·
问题
Unable to connect to Anthropic services
Failed to connect to api.anthropic.com: ERR_BAD_REQUEST
Please check your internet connection and network settings.
Note: Claude Code might not be available in your country. Check supported countries at
https://anthropic.com/supported-countries
核心原因
Anthropic 不支持你当前公网 IP 所在地区
官方支持地区列表:
https://anthropic.com/supported-countries
如果你在:
- 中国大陆
- 香港部分线路
- 某些 VPS 节点
- 被标记为数据中心 IP
都会被拒绝。
解决方法
你有代理,但 CLI 没走代理:
export HTTPS_PROXY=http://127.0.0.1:7890
export HTTP_PROXY=http://127.0.0.1:7890
验证:
curl https://api.anthropic.com
若返回:
{"error":"missing_api_key"}
然后重新运行:
claude
更多推荐


所有评论(0)