claudecode Note: Claude Code might not be available in your country. Check supported
在 Mac 或 Windows 终端/命令行中输入 claude 命令后,出现以下错误提示,无法正常使用 Claude 服务:Unable to connect to Anthropic servicesFailed to connect to api.anthropic.com: ECONNREFUSEDPlease check your internet connection and netw
在 Mac 或 Windows 终端/命令行中输入 claude 命令后,出现以下错误提示,无法正常使用 Claude 服务:
Unable to connect to Anthropic services
Failed to connect to api.anthropic.com: ECONNREFUSED
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
解决方案
“hasCompletedOnboarding”: true
详细步骤
通过修改 Claude 配置文件 .claude.json,新增 hasCompletedOnboarding: true 配置项,直接跳过首次启动引导,即可解决连接问题。Mac 和 Windows 仅文件路径不同,配置内容完全一致。
2.1 Windows 系统详细步骤
步骤 1:显示隐藏文件(关键)
打开「文件资源管理器」(快捷键 Win + E)
点击顶部「查看」选项卡
勾选「隐藏项目」(或直接按快捷键 Ctrl + H)
步骤 2:找到 .claude.json 配置文件
直接访问默认路径(替换 [你的用户名] 为系统实际用户名,如 Admin):
C:\Users[你的用户名].claude.json
编辑配置文件
右键 .claude.json → 选择「打开方式」→ 用「记事本」「Notepad++」或「VS Code」打开
在 JSON 根节点添加以下配置(与 projects、autoUpdates 同级,注意逗号分隔):
json
“hasCompletedOnboarding”: true
更多推荐
所有评论(0)