git clone 报错:fatal: HTTP request failed

git clone https://github.com/xxxx/lilxxy.git
Initialized empty Git repository in /tmp/clone123/lxyily/.git/
error: while accessing https://github.com/xxxx/lxyily.git/info/refs

fatal: 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 -V
curl 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.2
Protocols: 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

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

时间: 2024-08-29 23:19:21

git clone 报错:fatal: HTTP request failed的相关文章

[Linux]Centos git报错fatal: HTTP request failed

在使用git pull.git push.git clone会报类似例如以下的错误: error: The requested URL returned error: 401 Unauthorized while accessing https://git.oschina.net/zemo/demo.git/info/refs fatal: HTTP request failed 通常是因为git版本号的问题. 使用例如以下指令查看版本号: # git --version git version

解决git clone报错SSL certificate problem

Git新手一枚,今天进行git clone操作时发生如下问题:提示无效的链接 error: SSL certificate problem: Invalid certificate chain while accessing https://githib.com/...XXXX.git fatal: HTTP request failed 解决方法也很简单,一条命令就搞定了: git config --global http.sslVerify false  

git cherry-pick 报错 fatal: bad object

场景:程序员A提交了一个commit到gerrit上,我们叫他为commit_id1,但是还没有review,那就是没有入库,程序员B想再本地拿到这个commitd_id1,既然这个提交没有入库,很明显,B单纯执行git pull是拿不到这个提交的,那他要怎么办呢, 目前我想到的有几种方式:第一种如果只是单纯了改了很少量的文件,我们不排斥程序员A把这几个文件直接发给B.如果改动比较大呢?第二种,程序员A本地关于这个提交生成一个patch,发给B,B再在本地把这个patch打上,这是个不错的方式.

git clone 报错:fatal: index-pack failed 解决办法

[email protected] MINGW64 /d/Users/xxx/venv/program (master) $ git clone https://github.com/XXX/program. git Cloning into 'program'... remote: Enumerating objects: 1417, done. remote: Counting objects: 100% (1417/1417), done. remote: Compressing obje

在git clone报错

在阿里云新买了一台服务器,用的原正常运行的系统做的镜像文件,但在拉代码的时候提示如下报错:[[email protected] ]# git clone [email protected]:java/psd.gitCloning into 'psd'...ssh_exchange_identification: read: Connection reset by peerfatal: Could not read from remote repository. Please make sure

git push报错:error: RPC failed; result=22, HTTP code = 413

新项目推送到服务器时报错: error: RPC failed; result=22, HTTP code = 413| 7.66 MiB/s    fatal: The remote end hung up unexpectedly 查了下,属于项目中有大文件,而http推送限制造成的,需要修改服务器配置.因为git服务器是通过nginx做反向代理之后实现的,因此需要修改nginx和appache(git服务器): 1.nginx服务器配置:/etc/nginx/conf.d/default.

git clone报错error: RPC failed; curl 18 transfer closed with outstanding read data remaining

具体错误信息如下图: error: RPC failed; curl 18 transfer closed with outstanding read data remaining    fatal: The remote end hung up unexpectedly    fatal: early EOF    fatal: index-pack failed 这个错误产生的原因是时间太久,资源太大. 基于此,第一种考量即扩大缓存区.即在命令行输入:         git config 

git clone 报错 sign_and_send_pubkey: signing failed: agent refused operation Permission denied (publickey).

这个是我遇到的问题,一开始我以为是我的ssh公钥失效了,为了验证这一想法,我反复的将公钥创建 了N次,却依旧无法解决问题.于是,我就开始怀疑自己是否某些关键性的配置配置错误,或者粗心导致的,反复检查后发现自己没有问题.ok,下面是解决的办法: 在你的ternimal下执行该命令 ssh-agent -s 然后再执行下面的命令 ssh-add 参考:https://blog.csdn.net/StudyLww/article/details/90750158 原文地址:https://www.cn

git push 报错:failed to push some refs to '[email protected]:devops/thor.git'

error: failed to push some refs to '[email protected]:devops/thor.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing