git 无法推送到 GitHub 错误:pack-objects 死于信号 13
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18559015/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Can't push to GitHub error: pack-objects died of signal 13
提问by Dan
I'm having trouble pushing my local folder to my remote repository on GitHub.
我在将本地文件夹推送到 GitHub 上的远程存储库时遇到问题。
After I push it gets to around 96% then shows this..
在我把它推到 96% 左右后,然后显示这个..
Counting objects: 4145, done.
Delta compression using up to 2 threads.
Connection to github.com closed by remote host.
fatal: The remote end hung up unexpectedly
Compressing objects: 98% (3919/3969)
Then after the last 2% completes is shows this error...
然后在最后 2% 完成后显示此错误...
Compressing objects: 100% (3963/3963), done.
error: pack-objects died of signal 13
error: failed to push some refs to '[email protected]:example/example.git'
Unsure what that means.
不确定这意味着什么。
采纳答案by Roberto Tyley
This might be caused by the new GitHub limits on file sizes, or possibly the packing process is crashing out due to large data (like in this other SO question from 2011: Alternative way to do an initial push of a large repo) before those particular limits can even be reported.
这可能是由于GitHub 对文件大小的新限制造成的,或者可能是由于大数据导致打包过程崩溃(就像 2011 年的另一个 SO 问题:Alternative way to do a initial push of a large repo)在这些特定之前甚至可以报告限制。
A few weeks ago on a colleague's Mac OS X machine I saw a similar opaque error messag when pushing (tho' only over HTTPS - SSH gave the good error message) - yet having tried to reproduce this just now by pushing a big file to GitHub on my own Mac, I got the expected informative error message on both connection protocols ("remote: error: File big is 976.56 MB; this exceeds GitHub's file size limit of 100 MB"). It's possible that my colleague had an older version of Git installed that couldn't report the errors correctly.
几周前,在同事的 Mac OS X 机器上,我在推送时看到了类似的不透明错误消息(仅通过 HTTPS - SSH 给出了良好的错误消息) - 但我刚刚尝试通过将大文件推送到 GitHub 来重现此消息在我自己的 Mac 上,我在两种连接协议上都收到了预期的信息性错误消息(“远程:错误:文件大为 976.56 MB;这超出了 GitHub 的文件大小限制 100 MB”)。我的同事可能安装了旧版本的 Git,无法正确报告错误。
If you decide you need to remove the large files from your Git history (as it's the only way you'll get them pushed up to GitHub), I can recommend The BFG:
如果您决定需要从 Git 历史记录中删除大文件(因为这是将它们推送到 GitHub 的唯一方法),我可以推荐The BFG:
$ java -jar bfg.jar --strip-blobs-bigger-than 50M my-repo.git
Full disclosure: I'm the author of the BFG Repo-Cleaner.
完全披露:我是 BFG Repo-Cleaner 的作者。
回答by Milan Saha
Simple solution is to increase the HTTP post buffer size to allow for larger chunks to be pushed up to the remote repo. To do that, simply type:
简单的解决方案是增加 HTTP 发布缓冲区大小,以允许将更大的块推送到远程存储库。为此,只需键入:
git config http.postBuffer 52428800
The number is in bytes, so in this case I have set it to 50MB. The default is 1MB.
该数字以字节为单位,因此在这种情况下,我将其设置为 50MB。默认值为 1MB。
回答by Carlos Eduardo Santos
If you couldn't start the proccess it could also mean that permissions of your master server repository are wrong. I've just faced this problem, and my repository on master was with root.root permissions, so my user git couldn't write data there.
如果您无法启动该过程,也可能意味着您的主服务器存储库的权限错误。我刚刚遇到了这个问题,我在 master 上的存储库具有 root.root 权限,所以我的用户 git 无法在那里写入数据。
You may try checking your master's repository permissions before trying to push.
在尝试推送之前,您可以尝试检查您的 master 的存储库权限。
回答by Abu Shoeb
回答by Yann Stoneman
The same thing happened to me. I just tried git push
two more times and the third time it worked.
这样的事情我也经历过。我只是尝试了git push
两次,第三次成功了。