从github上clone代码的时候有时候报如下错误:
fatal: unable to access 'https://github.com/grpc/grpc-java.git/': error:1407742E
:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
我之前安装的git版本:
>git --version git version 1.8.3.msysgit.0
所以打算升级下git版本:2.20.1,在升级到此版本时,现在git的新版本又要求系统Vista及以上,我的还是xp老系统:参考:https://lobin.iteye.com/blog/2435854
所以打算在Cygwin下从源代码安装
Cygwin下从源代码安装git
从源代码安装git之前,先安装以下软件工具, 安装方法参考文章:https://lobin.iteye.com/blog/2435854
zlib
msgfmt(Search "gettext")
先下载git-2.19.2.tar.gz:
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.19.2.tar.gz
解压后:
$ ./configure $ make $ make install
检查是否安装成功
$ which git /usr/local/bin/git $ git --version git version 2.19.2
如果报fatal: 无法为 'https' 找到远程助手错误:
$ git clone https://github.com/grpc/grpc-java.git grpc-java 正克隆到 'grpc-java'... fatal: 无法为 'https' 找到远程助手
找到git-remote-https:
$ which git-remote-https /usr/lib/git-core/git-remote-https
将/usr/lib/git-core/git-remote-https添加到PATH环境变量。
这样就可以正常clone了:
$ git clone https://github.com/grpc/grpc-java.git grpc-java 正克隆到 'grpc-java'... remote: Enumerating objects: 2, done. remote: Counting objects: 100% (2/2), done. remote: Compressing objects: 100% (2/2), done. 接收对象中: 6% (5142/83931), 2.18 MiB | 9.00 KiB/s