{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"在绑定代码仓库或进行连通性测试时，可能会遇到如下报错："}]},{"type":"text","value":"\n"},{"type":"element","tagName":"blockquote","properties":{"data-alert":"warning"},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"GitLab connectivity test failed: RPC Call failed: [3] GitLab unreachable: error sending request for url (https://gitlab.jamerly.dev/api/v4/version)"}]}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"此问题通常与本地开发环境的"},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"网络代理"}]},{"type":"text","value":"或"},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"证书验证"}]},{"type":"text","value":"相关。以下是常见原因及排查方案："}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"常见原因 1：Shell 环境变量配置了 HTTP 代理"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"如果您在终端中配置了 "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"http_proxy"}]},{"type":"text","value":"、"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"https_proxy"}]},{"type":"text","value":" 或 "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"ALL_PROXY"}]},{"type":"text","value":" 环境变量（例如使用本地端口 "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"7890"}]},{"type":"text","value":" 或 "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"7892"}]},{"type":"text","value":"），Code Formula 发出的网络请求会被强行转发到代理服务器，导致私有或内网部署的 GitLab/GitHub 域名解析失败。"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"排查方法"}]},{"type":"text","value":"：\n在终端执行以下命令，检查是否存在代理输出："}]},{"type":"text","value":"\n"},{"type":"element","tagName":"pre","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"text","value":"echo $http_proxy\necho $https_proxy\n"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"解决办法"}]},{"type":"text","value":"："}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"临时关闭代理"}]},{"type":"text","value":"：\n在运行 Code Formula 的终端窗口中清空代理："},{"type":"text","value":"\n"},{"type":"element","tagName":"pre","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"text","value":"unset http_proxy https_proxy ALL_PROXY\n"}]}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"双保险白名单"}]},{"type":"text","value":"：\n在 Shell 配置文件（如 "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"~/.zshrc"}]},{"type":"text","value":"）中加入配置，强行指定对特定域名或整个 Code Formula 强制禁用代理："},{"type":"text","value":"\n"},{"type":"element","tagName":"pre","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"text","value":"# 强制让 Code Formula 客户端直连\nexport CF_GITLAB_NO_PROXY=1\n"}]}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"hr","properties":{},"children":[]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"常见原因 2：开启了 TUN 虚拟网卡模式"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"如果您开启了 Clash / Surge 等代理客户端的 TUN 模式，所有系统级流量（包括 Code Formula 服务）都会经过虚拟网卡。如果未正确设置路由分流规则，会导致内网域名解析失败。"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"解决办法"}]},{"type":"text","value":"：\n请在代理软件（如 Clash Verge / Surge）的 "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Bypass（绕过）/ Skip Proxy（跳过代理）"}]},{"type":"text","value":" 选项中，将您的 GitLab 域名（如 "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"gitlab.jamerly.dev"}]},{"type":"text","value":"）加入到直连/绕过名单中。"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"hr","properties":{},"children":[]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"常见原因 3：自签名/企业证书未信任"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"如果您的 GitLab 使用的是企业自签名证书，底层 TLS 验证器可能会拒绝连接。"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"解决办法"}]},{"type":"text","value":"："}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ol","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"在 macOS 钥匙串访问（Keychain Access）中找到对应证书（例如 "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"gitlab.jamerly.dev"}]},{"type":"text","value":"）。"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"双击证书，将其“信任”配置更改为“始终信任 (Always Trust)”。"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"推荐将证书导入到“系统” (System) 钥匙串中，确保当前 Mac 上的所有用户 and 后台进程均可共享此信任。"}]},{"type":"text","value":"\n"}]}]}