You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

更新GitHub及TortoiseGit后仍遇SSL协议版本错误求助

Fixing error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version in CMD Git Push

What's Going On Here?

That SSL error pops up because the Git client your CMD is using is trying to connect with an outdated TLS/SSL protocol version (like TLS 1.0 or 1.1) that GitHub no longer supports.

TortoiseGit works (despite the warning) because it usually bundles its own modern SSL library, so it can fallback to a supported protocol even if there's a minor version mismatch warning. Your CMD's Git instance, though, is relying on an older SSL setup—even if you updated GitHub Desktop or TortoiseGit, the Git executable in your system PATH might still be outdated.

Step-by-Step Fixes

  • First, check your CMD Git version
    Run this in CMD to confirm which Git you're using:

    git --version
    

    If the version is anything older than Git 2.14.1 (when TLS 1.2 support became default), that's the root problem.

  • Update the Git executable used by CMD

    • Option 1: Install the latest standalone Git for Windows. During installation, make sure to select "Use the OpenSSL library" and ensure the Git installation path is added to your system PATH (the installer usually does this by default).
    • Option 2: If you use GitHub Desktop, it includes a modern Git copy. Find its path (usually C:\Users\<YourUsername>\AppData\Local\GitHubDesktop\app-<VersionNumber>\resources\app\git\cmd), then add this path to the top of your system PATH (so CMD picks this Git first instead of any older versions).
  • Force Git to use TLS 1.2 globally
    Run these commands in CMD to enforce modern TLS:

    git config --global http.sslVersion tlsv1.2
    git config --global https.sslVersion tlsv1.2
    

    If you had any old proxy settings that might interfere, clear them too:

    git config --global --unset http.proxy
    git config --global --unset https.proxy
    
  • Verify your settings
    Check that the TLS config is applied:

    git config --global --get http.sslVersion
    git config --global --get https.sslVersion
    

    Both should return tlsv1.2. Now try pushing your code again—this should resolve the SSL error.

Why TortoiseGit Worked (With the Warning)

TortoiseGit doesn't rely on the system-wide Git or SSL libraries by default. It comes with its own bundled tools, so even if your system has outdated SSL components, TortoiseGit can negotiate a supported TLS version (hence the "unsupported ssl version" warning is just a minor mismatch notice, not a showstopper).

内容的提问来源于stack exchange,提问作者Robert

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 08:13:28