版权声明:本文为博主原创文章,未经博主允许不得转载。 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
二、原因
在 2018年2月22日19:00 UTC(太平洋标准时间上午11:00),GitHub 停止了对加密弱 TLS 1.0 和 1.1 协议的支持,并且仅支持与 TLS 1.2 协议的连接。
因此,如果你的 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
现在则可以使用 TLS 1.2 传输,并解决此问题
操作如下图:这里写链接内容