#4123·SteamTools

[BUG] 启用加速后 Schannel 客户端(Git for Windows / SDK / 自动更新)无法访问 GitHub

Author: PtJade-CeramicCreated Aug 5, 2026Updated Sep 18, 2026
Labelsbug

请认真检查以下清单中的每一项

  • 已经搜索过,没有发现类似的 issue
  • 已经搜索过文档,没有发现相关内容
  • 已经尝试使用过最新版,问题依旧存在
  • 使用的是官方版本(未替换及修改过安装目录程序文件)

描述

启用加速后,凡是使用 Schannel 作为 TLS 后端的客户端都无法访问 GitHub:Git for Windows SDK 里的 curl / git ls-remote 直接报错,Git for Windows 自身的每日自动更新检查则会静默失效(界面上没有任何报错提示)。

复现步骤

  1. 安装 git-sdk-installer-1.0.8-64.7z.exe
  2. (安装后一般会自动执行)打开安装目录中的 git-bash
  3. 打开 Watt Toolkit,选中“Github 网站 (Git Push)”,点击 一键加速
  4. 在刚才打开的 git-bash 中运行
    bash
    curl https://github.com
结果(停止加速、网络连接状况良好)
bash
$ curl -s -o /dev/null -w "%{http_code}" https://github.com/git-for-windows/git/
200
结果(开启 **一键加速**)
bash
$ curl -o /dev/null -v -w "%{http_code}" https://github.com
* Host github.com:443 was resolved.
* IPv6: (none)
* IPv4: 127.0.0.1
*   Trying 127.0.0.1:443...
* schannel: disabled automatic use of client certificate
* ALPN: curl offers http/1.1
* schannel: next InitializeSecurityContext failed: CRYPT_E_NO_REVOCATION_CHECK (0x80092012) - 吊销功能无法检查证书是否吊销。
* closing connection #0
curl: (35) schannel: next InitializeSecurityContext failed: CRYPT_E_NO_REVOCATION_CHECK (0x80092012) - 000

日志信息

nlog-all-2026-08-05.log

截图

其他信息

  • 处理器体系结构:arm64
  • 系统版本号:Windows 11 26200.8875
  • 下载渠道:微软商店
  • 程序版本:3.1.0
  • 是否包含独立运行时:

根因

加速开启后 github.com、api.github.com 等域名被 hosts 指向 127.0.0.1,由反代终止 TLS。反代使用本地根 CA 现场签发的叶子证书,但该证书没有任何扩展(实测 No extensions in certificate),既没有 CRL 分发点(CDP)也没有 AIA。Schannel 会强制检查吊销状态,拿不到吊销信息即判定失败,于是 TLS 握手在第一步就被拒:

curl: (35) schannel: next InitializeSecurityContext failed:
      CRYPT_E_NO_REVOCATION_CHECK (0x80092012) - 吊销功能无法检查证书是否吊销。

影响范围

  • Git for Windows SDK 内的 curl、git ls-remote 等:直接失败。
  • Git for Windows 的每日更新检查会静默失效:安装器创建的计划任务 Git for Windows Updater 以 git-bash.exe --hide --no-needs-console --command=cmd\git.exe update-git-for-windows --quiet --gui 运行;git-update-git-for-windows 的 http_get() 拿到退出码 35 后走 case $?,"$proxy" in 7,) ...;; *) return;; 静默返回,stderr 又被 --hide 吞掉,界面上没有任何提示,任务只留下一个非零结果(实测 LastTaskResult = 35),开启加速的用户因此长期收不到更新提示。
  • 上游 Git for Windows 自带的 git-update-git-for-windows 同样没有传 --ssl-revoke-best-effort,所以官方安装也一样受影响 —— 这也是为什么修复应该做在加速器服务端,而不是要求每个客户端各自加参数。

临时规避(客户端侧,无需升级加速器):给 curl 加 --ssl-revoke-best-effort —— 只在吊销信息缺失或吊销服务不可达时放行,吊销状态已知且为已吊销时仍然拒绝(Schannel 构建的 curl ≥ 7.70)。本机实测:默认写法退出码 35,加该参数后 HTTP 200。--ssl-no-revoke 也能通,但它会把吊销检查彻底关掉(所有站点、所有时刻),安全性下降较多,不推荐。

Source: BeyondDimension/SteamTools