在使用git推送项目时候出现 “fatal: The remote end hung up unexpectedly ” 原因

在使用git推送项目时候出现 “fatal: The remote end hung up unexpectedly ” 原因是推送的文件太大。

解决方案1:
在克隆/创建版本库生成的 .git目录下面修改生成的config文件增加如下:

[http]  
postBuffer = 524288000

结果如下

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
[remote "origin"]
    url = https://github.com/lccbiluox2/Spark.2.2.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master
[http]
postBuffer = 524288000

重新推送即可。

或者设置缓存

lcc@DESKTOP-UOBV3HJ MINGW64 /f/IntelliJ_IDEA/01-work/Spark-2.2.src.lcc (master)
$ git config http.postBuffer 524288000

lcc@DESKTOP-UOBV3HJ MINGW64 /f/IntelliJ_IDEA/01-work/Spark-2.2.src.lcc (master)
$ git push -f origin master
Counting objects: 164, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (140/140), done.
Writing objects: 100% (164/164), 245.04 MiB | 21.94 MiB/s, done.
Total 164 (delta 58), reused 0 (delta 0)

解决方案2:
使用git更新或提交中途有时出现The remote end hung up unexpectedly的异常,特别是资源库在国外的情况下。此问题可能由网络原因引起。

配置git的最低速度和最低速度时间:

git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999  单位 秒

--global配置对当前用户生效,如果需要对所有用户生效,则用--system

解决方案3:
fatal: The remote end hung up unexpectedly | 7.00 KiB/s

这句显示 远程结束挂起 |7kb/s

应该是墙的原因导致网速太慢,且项目有点大上传不上

解决办法:翻墙 或者等等重新在push一遍 就没问题了
 

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值