【问题标题】:Eclipse EGit Committing fails - Caused by: java.io.EOFExceptionEclipse EGit 提交失败 - 原因:java.io.EOFException
【发布时间】:2012-05-09 13:05:53
【问题描述】:

错误的详细信息如下。我刚刚安装在一台新的 Windows 7 机器上,并且在 EGit 中完成任何提交时都会收到此错误。我可以使用 Git Bash shell 成功提交。我检查了 EGit 的更新,但没有找到。其他 EGit 功能(如 pull 和 push)确实有效,但我必须在 Git shell 中进行提交。

发生内部错误 执行提交命令时捕获异常

堆栈跟踪

org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of commit command
    at org.eclipse.jgit.api.CommitCommand.call(CommitCommand.java:277)
    at org.eclipse.egit.core.op.CommitOperation.commit(CommitOperation.java:255)
    at org.eclipse.egit.core.op.CommitOperation.access$7(CommitOperation.java:233)
    at org.eclipse.egit.core.op.CommitOperation$1.run(CommitOperation.java:197)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2326)
    at org.eclipse.egit.core.op.CommitOperation.execute(CommitOperation.java:207)
    at org.eclipse.egit.ui.internal.commit.CommitUI$2.run(CommitUI.java:220)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.io.EOFException: Input did not match supplied length. 239 bytes are missing.
    at org.eclipse.jgit.storage.file.ObjectDirectoryInserter.shortInput(ObjectDirectoryInserter.java:237)
    at org.eclipse.jgit.storage.file.ObjectDirectoryInserter.toTemp(ObjectDirectoryInserter.java:168)
    at org.eclipse.jgit.storage.file.ObjectDirectoryInserter.insert(ObjectDirectoryInserter.java:105)
    at org.eclipse.jgit.api.CommitCommand.createTemporaryIndex(CommitCommand.java:363)
    at org.eclipse.jgit.api.CommitCommand.call(CommitCommand.java:195)
    ... 8 more

会话数据:

eclipse.buildId=M20120208-0800
java.version=1.6.0_32
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.rcp.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.rcp.product

啊哈,在 Eclipse Egit 社区论坛上发现了这个,描述了一个几乎相同的问题:http://www.eclipse.org/forums/index.php/m/820938/?srch=eofexception#msg_820938

解决方案是从这里为 EGit 和 JGit 安装最新的夜间版本:http://download.eclipse.org/egit/updates-nightly/

【问题讨论】:

    标签: eclipse exception commit egit


    【解决方案1】:

    我已经解决了从项目的 .git 文件夹中删除 index.lock 文件的情况。

    【讨论】:

      【解决方案2】:

      在我的 ubuntu 14.04 中,我安装了 jgit [ sudo apt-get install jgit-cli ],问题就解决了。安装后我重新启动了netbeans。

      【讨论】:

        【解决方案3】:

        是的,通过从项目的 .git 文件夹中删除 index.lock 文件,它可以正常工作。

        【讨论】:

          【解决方案4】:

          我已通过将用户组更改为 Ubuntu 16.04 上的当前用户来解决此问题。希望对您有所帮助。

          cd 项目目录 sudo chown -R 1000:1000 .

          【讨论】:

            【解决方案5】:

            我当时提交了一个文件,直到找到“损坏”的文件。 就我而言,它是一个word文件。我没答应

            【讨论】:

              猜你喜欢
              • 2011-03-05
              • 2014-04-07
              • 1970-01-01
              • 2023-03-03
              • 2013-06-13
              • 1970-01-01
              • 2014-11-23
              • 1970-01-01
              • 2018-12-08
              相关资源
              最近更新 更多