git学习git clone 出错 error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version(代码

Posted 欧阳鹏

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了git学习git clone 出错 error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version(代码相关的知识,希望对你有一定的参考价值。

一、错误描述

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

以上是关于git学习git clone 出错 error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version(代码的主要内容,如果未能解决你的问题,请参考以下文章

新的电脑拉取 or clone 代码出错解决方法

git clone 出错 fatal: pack has bad object at offset 26060927: inflate returned -3

git克隆出错 github clone Permission denied (publickey) fatal Could not read from remote repo

git学习整理git clone 理解

Git学习Git如何Clone带有Submodule的仓库?

Git学习Git如何Clone带有Submodule的仓库?