一、错误描述

使用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

在这里插入图片描述

We will then restore support for the deprecated algorithms and provide a two week grace period for these systems to upgrade their libraries before we disable support for the deprecated algorithms permanently on February 22, 2018.

在这里插入图片描述

As noted above, the vast majority of traffic should be unaffected by this change. However, there are a few remaining clients that we anticipate will be affected. Fortunately, the majority of clients can be updated to work with TLSv1.2.

在这里插入图片描述
总之一句话,升级到TLSv1.2版本去吧!

三、解决错误

添加如下两条配置

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 项目即可,如下所示:

在这里插入图片描述

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐