登录问题
# 登录时报错:
运行 claude 命令报错:
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
1
2
3
4
5
6
7
2
3
4
5
6
7
# 解决办法
- 打开配置文件 `~/.claude.json。
- 增加配置这个字段
"hasCompletedOnboarding": true
{
"installMethod": "unknown",
"autoUpdates": true,
"cachedStatsigGates": {
"tengu_disable_bypass_permissions_mode": false
},
"firstStartTime": "2025-09-02T08:08:19.595Z",
},
"hasCompletedOnboarding": true //增加这个字段
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
上次更新: 2025/09/18, 20:06:50