分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 软件开发

git clone 报错:fatal: HTTP request failed

发布时间:2023-09-06 01:58责任编辑:蔡小小关键词:暂无标签
git clone https://github.com/xxxx/lilxxy.gitInitialized empty Git repository in /tmp/clone123/lxyily/.git/error: ?while accessing https://github.com/xxxx/lxyily.git/info/refsfatal: HTTP request failed

这个报错的原因可以能是:
1、服务器时间问题
2、git 版本问题
3、curl版本问题
对于3,因为git 在连接的时候内部其实是curl来连接。通过curl https://xxxx 发现也是报错,发现ssl 连接有问题
通过可以git clone的服务器对比发现出现故障的服务器的curl版本不一样。所以更新curl

yum update -y nss curl libcurl

这里nss是默认使用ssl认证方式,当然也可以改成openssl的方式。查看是否是nss或者OpenSSL认证的方式为

 curl -Vcurl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.27.1 zlib/1.2.3 libidn/1.18 libssh2/1.4.2Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz 

如果需要改成OpenSSL的方式,可以参考网络上的

https://www.cnblogs.com/showker/p/4706271.html

git clone 报错:fatal: HTTP request failed

原文地址:http://blog.51cto.com/sgk2011/2124433

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved