配置Claude Code遇到Unable to connect to Anthropic services Failed to connect to api.anthropic.cOm: ERR_B

张开发
2026/6/17 15:00:33 15 分钟阅读
配置Claude Code遇到Unable to connect to Anthropic services Failed to connect to api.anthropic.cOm: ERR_B
在PowerShell里输入[Environment]::SetEnvironmentVariable(HTTP_PROXY, http://127.0.0.1:xxxxx, User)[Environment]::SetEnvironmentVariable(HTTPS_PROXY, http://127.0.0.1:xxxxx, User)[Environment]::SetEnvironmentVariable(NO_PROXY, localhost,127.0.0.1,::1, User)xxxxx是你自己的本地代理端口完成之后关掉PowerShell再打开一个新的PowerShell输入echo $env:HTTP_PROXYecho $env:HTTPS_PROXYecho $env:NO_PROXY应该能看到刚才配置的端口再在PowerShell中执行Claude即可

更多文章