GitHub 报错SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lzc4869/article/details/79528505

一、报错信息

fatal: unable to access 'https://github.com/huihut/interview.git/': error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
Pushing to https://github.com/huihut/interview.git

二、原因

因此,如果你的 git 连接方式仍然是 TLS 1.0 或 1.1,则会报错。

三、解决办法

  • 查看你的 TLS 版本
git config --global --list
  • 如果仍然是 TLS 1.0 或 1.1,则下载更新 Git 最新版:https://git-scm.com/

  • 安装好最新版 Git 后,更新 TLS

git config --global --unset http.sslVersion
git config --global --add http.sslVersion tlsv1.2

猜你喜欢

转载自blog.csdn.net/lzc4869/article/details/79528505