Eclipse EGit提交失败 - 原因:java.io.EOFException。

4
以下是错误细节。我刚在一台新的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/
5个回答

1
我已经解决了我的问题,只需要从项目的.git文件夹中删除index.lock文件即可。

0
在我的Ubuntu 14.04中,我安装了jgit [sudo apt-get install jgit-cli],问题得到了解决。安装完成后,我重新启动了NetBeans。

0

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


0

我已经通过将用户组更改为Ubuntu 16.04上的当前用户来解决了这个问题。希望能有所帮助。

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


-1

我一次提交一个文件,直到找到了“损坏”的文件。 在我的情况下,它是一个Word文件。我没有提交它。


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