• Download
  • Getting Started
  • Members
  • Projects
  • Stacktrace of the exception When using CloneCommand with a Git that contains a very large file we get the following exception. (The Git can be successfully cloned with the git command line client) org.eclipse.jgit.errors.TransportException: Object too large (2.786.986.380 bytes), rejecting the pack. Max object size limit is 2.147.483.639 bytes.
    Stacktrace as text:
    [...]
    Caused by: org.eclipse.jgit.api.errors.TransportException: Object too large (2,647,272,942 bytes), rejecting the pack. Max object size limit is 2,147,483,639 bytes.
    	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:255)
    	at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:302)
    	at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:200)
    	at org.conqat.engine.index.shared.GitUtils.cloneAndSetUpRepository(GitUtils.java:139)
    	... 21 more
    Caused by: org.eclipse.jgit.errors.TransportException: Object too large (2,647,272,942 bytes), rejecting the pack. Max object size limit is 2,147,483,639 bytes.
    	at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:405)
    	at org.eclipse.jgit.transport.TransportHttp$SmartHttpFetchConnection.doFetch(TransportHttp.java:1328)
    	at org.eclipse.jgit.transport.BasePackFetchConnection.fetch(BasePackFetchConnection.java:328)
    	at org.eclipse.jgit.transport.BasePackFetchConnection.fetch(BasePackFetchConnection.java:319)
    	at org.eclipse.jgit.transport.FetchProcess.fetchObjects(FetchProcess.java:266)
    	at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:163)
    	at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:124)
    	at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1292)
    	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:244)
    	... 24 more
    Caused by: org.eclipse.jgit.errors.TooLargeObjectInPackException: Object too large (2,647,272,942 bytes), rejecting the pack. Max object size limit is 2,147,483,639 bytes.
    	at org.eclipse.jgit.transport.PackParser.checkIfTooLarge(PackParser.java:752)
    	at org.eclipse.jgit.transport.PackParser.indexOneObject(PackParser.java:1003)
    	at org.eclipse.jgit.transport.PackParser.parse(PackParser.java:568)
    	at org.eclipse.jgit.internal.storage.file.ObjectDirectoryPackParser.parse(ObjectDirectoryPackParser.java:201)
    	at org.eclipse.jgit.transport.PackParser.parse(PackParser.java:529)
    	at org.eclipse.jgit.transport.BasePackFetchConnection.receivePack(BasePackFetchConnection.java:823)
    	at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:398)
    	... 32 more
    Committing 2GB files into git seems unusual. Do you set a max object size limit on ReceivePack [1] ? [1] https://download.eclipse.org/jgit/site/5.7.0.202003110725-r/apidocs/org/eclipse/jgit/transport/ReceivePack.html#setMaxObjectSizeLimit-long -
    I would like to revive this ticket, as we have users with Git repositories containing such large files (> 2 GB). While I agree that this is bad practice, we can not really change this situation.
    Out of curiosity, I disabled the last check in PackParser#checkIfTooLarge, which compares against Java's max array size. After that, cloning of such a repository worked flawlessly. 
    So, could it be that this has actually been fixed meanwhile in some other context and the only blocker is the (potentially outdated) check I mentioned?