I have a VERY strange and not so covered issue with a specific Windows Build Server (Jenkins Slave).

In Jenkins I have a Job that pulls the latest code from a specific branch.

The actual command the git is trying to execute is:

git fetch -t origin +refs/heads/*:refs/remotes/origin/*

Before few hours, after working well for 1 month, suddenly the Job fails with this error:

ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
hudson.plugins.git.GitException: Command "C:\Program Files (x86)\Git\bin\git.exe fetch -t origin +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stderr: fatal: pack has 1 unresolved delta
fatal: index-pack failed

I tried to find some posts about it over the web, but nothing came up...

Things I already tried:

  1. Uninstall git and install again
  2. Delete the workspace (which is deleted also by the job as the wipe out option is chosen"
  3. Delete ALL the workspace from the system
  4. git fsck - No interesting results
  5. git verify-pack - No interesting results
  6. git index-pack + the relevant pack file - No interesting results here as well

Some more (hopefully important) information:

  1. From this Server, when I am working via CMD / GitBash - The same issue persist
  2. From other Servers / PC, I am able to execute this command with the same git Repo that makes me troubles...
  3. Other tasks that work with different Git Repo on the SAME build Server works fluently.

I am LOST. Can someone shed some light on this?

  • 1
    There is no need to add your name to every single question and answer. Your avatar, user name and a link to your profile are clearly visible by default.
    – Karan
    Apr 22, 2013 at 12:56
  • Is your Git repository hosted on Gerrit by any chance?
    – sschuberth
    May 9, 2014 at 12:47
  • Yes it is hosted on Gerrit
    – GorovDude
    Sep 8, 2014 at 7:23

3 Answers 3


The Root Cause for all this mess is still unknown for me.

But now I managed to overcome it this way:

In the Jenkins Job, under the Git SCM configuration the following lags were on:

  1. Wipe out workspace before build
  2. Use shallow clone

Removing the 2 of them solved the problem.

Afterwards, it is possible to put them back and it will still work.


  • I encountered the same problem, but Use shallow clone and Wipe out workspace before build were already disabled.
    – tony19
    Sep 6, 2013 at 14:26

A reason I had this problem was the git clone was done 'shallow' hence it didn't have the full history of commits (hence fetch couldn't see the full history to calculate deltas).

Check Git log in the working tree you're trying to fetch into, it shouldn't have full history - mine had only a few commits listed with the oldest one on the list was saying it was adding a 'new file' for all the files in the repo - a squashed one I think.

Make sure no GIT_DEPTH variable is set, then

git pull --unshallow


git pull 

and try fetch again.


I was facing the same issue. I first created a new branch from master and checked if deployment was working fine from that branch and it did. So I tried deleting the the workspace for the master branch (did it manually) and that fixed my case.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .