0


git clone两个难搞的报错以及解法

本文废话较多 解决方法加背景色了 大家直接看

前情:很久没用gihub,自然也没关心过git的问题。

问题一:登录github后,提示ssh什么的过期?

解决:(难度等级:轻松)按照这篇博客的解法轻松解决!github克隆拉取项目,创建publicKey,解决Key is invalid. You must supply a key in OpenSSH public key format。-CSDN博客

剧情线:然后连着vpn登上,在gitbash中克隆文档时候出现报错“fatal: unable to access 'https://github.com/WhiteNight123/parser-resume.git/': Failed to connect to github.com port 443: Timed out”
看到time out 两个字博主本人还是很有自信的,超时了呗,肯定是连vpn的原因,所以首先关闭了vpn代理,发现不行,以为是公用网络的问题,于是又换到了热点,心想这下总该解决了吧呵呵呵。。。然后还是报错。此时博主开始进行一番查阅。

解决:(难度等级:中等)网上有很多帖子提到利用$ git config --global --unset https.proxy和$ git config --global --unset http.proxy这两行命令解决,并且对很多网友都有效果。博主本人经过尝试后无效,放弃。而后偶然翻到博文

通过设置-网络和Internet代理-手动设置代理-开-编辑-查看到了ip地址和端口,利用$ git config --global http.proxy http://127.0.0.1:7890和$ git config --global https.proxy http://127.0.0.1:7890两行命令,再进行git clone发现!!居然出现新的错误了!!誒!悲惨 一晚上耗费在这里了。。

问题三:(难度等级:重度)接上,运行克隆命令后,出现Cloning into 'parser-resume'...
remote: Enumerating objects: 481, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (14/14), done.
error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: CANCEL (err 8)
error: 4507 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output

出现这个报错博主本人有点呆了,查阅后发现通常是由于要克隆的仓库本身巨大,下载能力又不足造成的。

解决:①按照博客进行缓存清理,无效(注意:只是因为本人下载很多次了,觉得需要清理一下缓存,不确定是否为仓库巨大导致的,并不是这篇博客无用,只是针对我的报错无用而已)解决RPC failed; curl 92 HTTP/2 stream 5 was not closed cleanly before end of the underlying str_error: rpc failed; curl 92 http/2 stream 5 was not-CSDN博客

②按照博客操作,突然下载的巨快,但是到百分之十五左右就停了,然后又出现同样的错误成功解决使用git clone下载失败的问题: fatal: 过早的文件结束符(EOF) fatal: index-pack 失败_fatal: 远端意外挂断了/803), 11.65 mib | 30.00 kib/s fatal-CSDN博客

③博主陷入崩溃,偶然翻到了评论,说可以增加增大postBuffer,结果加的太大了哈哈哈 Out of memory, malloc failed (tried to allocate 2690588672 bytes)出现这个问题。

④将postBuffer定为2000000000,终于成功了!

但是博主在克隆另一个仓库的时候又出现了Cloning into 'parser-resume'...
remote: Enumerating objects: 481, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (14/14), done.
error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: CANCEL (err 8)
error: 2910 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output

救命啊,在尝试改了postBuffer等等一系列操作都不管用,救命!!不管啦 直接强制下载了 好在强制下载成功了

标签: git github gitcode

本文转载自: https://blog.csdn.net/weixin_53043309/article/details/135942517
版权归原作者 狗也可以叫汤姆 所有, 如有侵权,请联系我们删除。

“git clone两个难搞的报错以及解法”的评论:

还没有评论