title: java.io.EOFException: Short read of block. When scanning a multibranch pipeline in Jenkins
body: <p>I have a Jenkins box set up with a few different projects inside it, all of which run fine except this one. Below is the full error message, any help would be much appreciated.</p>
  
  <p>[Tue Feb 27 10:30:53 UTC 2018] Starting branch indexing...</p>
  
  <blockquote>
    <p>git --version # timeout=10</p>
  </blockquote>
  
  <p>using GIT_SSH to set credentials</p>
  
  <blockquote>
    <p>git ls-remote git@bitbucket.org:ShopDirect/galleryproductservice.git # timeout=10</p>
    
    <p>git rev-parse --is-inside-work-tree # timeout=10</p>
  </blockquote>
  
  <p>Setting origin to git@bitbucket.org:ShopDirect/galleryproductservice.git</p>
  
  <blockquote>
    <p>git config remote.origin.url git@bitbucket.org:ShopDirect/galleryproductservice.git # timeout=10</p>
  </blockquote>
  
  <p>Fetching &amp; pruning origin...
  Fetching upstream changes from origin</p>
  
  <blockquote>
    <p>git --version # timeout=10</p>
  </blockquote>
  
  <p>using GIT_SSH to set credentials </p>
  
  <blockquote>
    <p>git fetch --tags --progress origin +refs/heads/<em>:refs/remotes/origin/</em> --prune</p>
  </blockquote>
  
  <p>Listing remote references...</p>
  
  <blockquote>
    <p>git config --get remote.origin.url # timeout=10
    using GIT_SSH to set credentials </p>
    
    <p>git ls-remote -h git@bitbucket.org:ShopDirect/galleryproductservice.git # timeout=10</p>
  </blockquote>
  
  <p>Checking branches...
    Checking branch master</p>
  
  <p>ERROR: [Tue Feb 27 10:30:56 UTC 2018] Could not fetch branches from source 4f8abeb4-bbc0-4de0-bf74-9b2c3cf1cb71</p>
  
  <p>java.io.EOFException: Short read of block.</p>
  
  <pre><code>at org.eclipse.jgit.util.IO.readFully(IO.java:249)
  at org.eclipse.jgit.internal.storage.file.UnpackedObject.open(UnpackedObject.java:105)
  at org.eclipse.jgit.internal.storage.file.ObjectDirectory.openLooseObject(ObjectDirectory.java:444)
  at org.eclipse.jgit.internal.storage.file.ObjectDirectory.openLooseFromSelfOrAlternate(ObjectDirectory.java:403)
  at org.eclipse.jgit.internal.storage.file.ObjectDirectory.openObject(ObjectDirectory.java:385)
  at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:154)
  at org.eclipse.jgit.treewalk.CanonicalTreeParser.reset(CanonicalTreeParser.java:214)
  at org.eclipse.jgit.treewalk.TreeWalk.parserFor(TreeWalk.java:1286)
  at org.eclipse.jgit.treewalk.TreeWalk.reset(TreeWalk.java:699)
  at org.eclipse.jgit.treewalk.TreeWalk.forPath(TreeWalk.java:207)
  at org.eclipse.jgit.treewalk.TreeWalk.forPath(TreeWalk.java:249)
  at org.eclipse.jgit.treewalk.TreeWalk.forPath(TreeWalk.java:281)
  at jenkins.plugins.git.AbstractGitSCMSource$TreeWalkingSCMProbe.stat(AbstractGitSCMSource.java:1345)
  at org.jenkinsci.plugins.workflow.multibranch.WorkflowBranchProjectFactory$1.isHead(WorkflowBranchProjectFactory.java:74)
  at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:344)
  at jenkins.plugins.git.AbstractGitSCMSource$8.discoverBranches(AbstractGitSCMSource.java:557)
  at jenkins.plugins.git.AbstractGitSCMSource$8.run(AbstractGitSCMSource.java:535)
  at jenkins.plugins.git.AbstractGitSCMSource$8.run(AbstractGitSCMSource.java:521)
  at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:352)
  at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:521)
  at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:355)
  at jenkins.scm.api.SCMSource.fetch(SCMSource.java:265)
  at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:634)
  at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:276)
  at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165)
  at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:978)
  at hudson.model.ResourceController.execute(ResourceController.java:97)
  at hudson.model.Executor.run(Executor.java:421)
  </code></pre>
  
  <p>[Tue Feb 27 10:30:56 UTC 2018] Finished branch indexing. Indexing took 2.8 sec
  FATAL: Failed to recompute children of GalleryProductService
  java.io.EOFException: Short read of block.
      at org.eclipse.jgit.util.IO.readFully(IO.java:249)
      at org.eclipse.jgit.internal.storage.file.UnpackedObject.open(UnpackedObject.java:105)
      at org.eclipse.jgit.internal.storage.file.ObjectDirectory.openLooseObject(ObjectDirectory.java:444)
      at org.eclipse.jgit.internal.storage.file.ObjectDirectory.openLooseFromSelfOrAlternate(ObjectDirectory.java:403)
      at org.eclipse.jgit.internal.storage.file.ObjectDirectory.openObject(ObjectDirectory.java:385)
      at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:154)
      at org.eclipse.jgit.treewalk.CanonicalTreeParser.reset(CanonicalTreeParser.java:214)
      at org.eclipse.jgit.treewalk.TreeWalk.parserFor(TreeWalk.java:1286)
      at org.eclipse.jgit.treewalk.TreeWalk.reset(TreeWalk.java:699)
      at org.eclipse.jgit.treewalk.TreeWalk.forPath(TreeWalk.java:207)
      at org.eclipse.jgit.treewalk.TreeWalk.forPath(TreeWalk.java:249)
      at org.eclipse.jgit.treewalk.TreeWalk.forPath(TreeWalk.java:281)
      at jenkins.plugins.git.AbstractGitSCMSource$TreeWalkingSCMProbe.stat(AbstractGitSCMSource.java:1345)
      at org.jenkinsci.plugins.workflow.multibranch.WorkflowBranchProjectFactory$1.isHead(WorkflowBranchProjectFactory.java:74)
      at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:344)
      at jenkins.plugins.git.AbstractGitSCMSource$8.discoverBranches(AbstractGitSCMSource.java:557)
      at jenkins.plugins.git.AbstractGitSCMSource$8.run(AbstractGitSCMSource.java:535)
      at jenkins.plugins.git.AbstractGitSCMSource$8.run(AbstractGitSCMSource.java:521)
      at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:352)
      at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:521)
      at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:355)
      at jenkins.scm.api.SCMSource.fetch(SCMSource.java:265)
      at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:634)
      at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:276)
      at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165)
      at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:978)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:421)
  Finished: FAILURE</p>