一、错误描述
使用git 命令 clone 一个git 仓库的时候报错,如下所示:
C:\Users\000> git clone https://hub.fastgit.org/githubhaohao/NDK_OpenGLES_3_0.git
Cloning into 'NDK_OpenGLES_3_0'...
fatal: unable to access 'https://hub.fastgit.org/githubhaohao/NDK_OpenGLES_3_0.git/':
error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
二、分析错误
2.1 查看http.sslVersion版本
http.sslVersion版本 为 tlsv1.0 如下所示:
C:\Users\000>git config http.sslVersion
tlsv1.0
三、解决错误
添加如下两条配置
C:\Users\000>git config --global --unset http.sslVersion
C:\Users\000>git config --global --add http.sslVersion tlsv1.2
C:\Users\000>git config --global --add http.sslbackend openssl
然后重新git clone 项目即可,如下所示: