Git中遇到的问题


此文章是自己在Git操作时遇到的问题,先开个坑记录下来,如果以后还遇到了Git上的其他问题,会在后面进行添加。

Clone克隆

bytes of body are still expected

Clone失败信息如下:

git.exe clone --progress -v “https://github.com/linglongbayinhe/UnrealEnginez.git” “E:\UnrealEngine5.1”
Cloning into ‘E:\UnrealEngine5.1’…
POST git-upload-pack (185 bytes)
POST git-upload-pack (gzip 14312 to 7147 bytes)
remote: Enumerating objects: 4644837, done.
remote: Counting objects: 100% (53/53), done.
remote: Compressing objects: 100% (23/23), done.
error: 7747 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
git did not exit cleanly (exit code 128) (190609 ms @ 2023/2/28 10:17:17)
在这里插入图片描述

解决方案:
修改git 的缓存(大小需要根据下载包大小进行调整)

git config --global http.postBuffer 1024M


unable to access

git.exe clone --progress -v “https://github.com/linglongbayinhe/UnrealEnginez.git” “E:\UnrealEngine5.1”
Cloning into ‘E:\UnrealEngine5.1’…
fatal: unable to access ‘https://github.com/linglongbayinhe/UnrealEnginez.git/’: OpenSSL SSL_read: Connection was reset, errno 10054
git did not exit cleanly (exit code 128) (27203 ms @ 2023/2/28 10:47:23)
在这里插入图片描述

原因:
git在拉取或者提交项目时,中间会有git的http和https代理,但是我们本地环境本身就有SSL协议了,所以取消git的https代理即可,不行再取消http的代理。
解决方案:
取消git本身的https代理,使用自己本机的代理。

git config --global --unset http.proxy//取消http代理
git config --global --unset https.proxy//取消https代理

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值