【问题标题】:Pushing large commit to GitHub results in a fatal write error: Bad file descriptor将大量提交推送到 GitHub 会导致致命的写入错误:Bad file descriptor
【发布时间】:2013-12-31 22:51:42
【问题描述】:

我正在使用 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)
  • 我首先假设它可能是由远程主机引起的
  • 您可以尝试将其推入分段,看看您是否仍然收到信号 9 错误?
  • 服务器磁盘满了吗?

标签: git github https


【解决方案1】:

我在使用 git pack 文件时遇到了这个问题。为了解决这个问题,我重新包装并指定了包装的最大尺寸。

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

【讨论】:

    【解决方案2】:

    Github 因提交大小过大而断开连接。考虑这个帮助页面:

    https://help.github.com/articles/working-with-large-files

    如果您使用 SSH,您会看到类似这样的内容

    远程:警告:检测到大文件。

    远程:错误:文件 Giant_file 为 123.00 MB;这超出了 GitHub 的 100 MB 文件大小限制

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

    【讨论】:

    • 我切换到 SSH 但我遇到了同样的错误。我只是分几块提交,最终能够同步所有内容。
    【解决方案3】:

    这个技巧可能适用于我正在使用 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

    【讨论】:

      猜你喜欢
      • 2018-12-21
      • 2011-12-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-01
      • 1970-01-01
      • 2023-03-15
      • 2018-05-11
      相关资源
      最近更新 更多