php git clone,【原创】解决 git clone 报错 fatal: HTTP request failed

在尝试使用git clone命令获取Vundle.vim时遇到错误,原因是git版本过低,导致无法处理HTTPS请求。GitHub不再支持dumb-http协议,要求升级git客户端。解决方案包括通过yum安装curl及其依赖,并手动升级git到最新版本。
摘要由CSDN通过智能技术生成

问题背景:

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

问题现象:

执行后报错:

1. error while processing: https://github.com/VundleVim/Vundle.vim.git/info/refs

2. fatal: HTTP request failed

问题排查:

浏览器中直接请求 https://github.com/VundleVim/Vundle.vim.git/info/refs, 浏览器返回:

Please upgrade your git client.

GitHub.com no longer supports git over dumb-http: https://github.com/blog/809-git-dumb-http-transport-to-be-turned-off-in-90-days

问题原因:

综上分析是 git version 版本过低造成,其实只是因为更新了curl依赖的ssl,git对于https的请求都通过curl发出去的。

问题解决:

升级 git client 版本

yum install curl

yum install curl-devel

yum install zlib-devel

yum install openssl-devel

yum install perl

yum install cpio

yum install expat-devel

yum install gettext-devel

wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.xz

xz -d git-latest.tar.xz

tar xvf git-latest.tar

cd git-xxxx-xx-xx

autoconf

./configure

make && make install

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值