将大型提交推送到GitHub会导致致命的写入错误:坏文件描述符。

3

我正在使用GitHub管理我的仓库,当尝试推送一个大型提交(1.5 GB)时,出现以下错误。

error: pack-objects died of signal 9
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
fatal: write error: Bad file descriptor

有什么想法可以解决这个问题吗?

你使用https/ssh/*来进行推送吗?另一端是否有任何应用程序(例如gitlab)? - frlan
可能是与此问题 Git push "error: index-pack died of signal 9" 相关的重复问题。 - Nanne
你能否尝试推送它的段并查看是否仍然会出现信号9错误? - Wold
@frlan:我正在使用HTTPS和GitHub。 - David Jones
@BorisBrodski:不,我没有使用任何代理... - David Jones
显示剩余3条评论
3个回答

6

我遇到了一个关于Git打包文件的问题。为了解决它,我重新打包并指定了打包文件的最大大小。

git repack --max-pack-size=100M -a -d

4
Github因提交文件过大而断开连接。请参考以下帮助页面:https://help.github.com/articles/working-with-large-files。如果您使用SSH,则会看到类似以下的内容:

remote: warning: Large files detected.

remote: error: File giant_file is 123.00 MB; this exceeds GitHub's file size limit of 100 MB

在这种情况下,您的提交将被拒绝。使用HTTPS目前无法将错误消息传输到客户端。

我切换到SSH但仍然遇到了相同的错误。 我只是分几次提交,最终成功地将所有内容同步。 - David Jones

2

这个技巧可能适用于我在使用git尝试将文件推送到Bluehost上的github,但这也可以泛指许多托管公司。之前的技巧都没有奏效。 在遇到以下错误后:

Counting objects: 3532, done.
Delta compression using up to 24 threads.
fatal: unable to create thread: Resource temporarily unavailable
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
fatal: write error: Bad file descriptor

这让我能够在共享主机上发送git提交。它必须禁止额外的线程。

git config --global pack.threads "1"

相关问题和解决方案在这里:git push fatal: unable to create thread: Resource temporarily unavailable


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接