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
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐



所有评论(0)