Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4791 pages
Servers, nginx and Docker

A CI git clone stops with index-pack died of signal 15

Your error

error: index-pack died of signal 151 more line it can show

Fix it fast

Most common cause, 1 of 2

The Jenkins Git plugin's 10-minute clone and fetch timeout ran out

Give clone and fetch more minutes and download less.

Fix
checkout scmGit(
    branches: [[name: '*/main']],
    extensions: [ cloneOption(shallow: true, depth: 1, noTags: true, timeout: 30) ],
    userRemoteConfigs: [[url: 'https://github.com/example/big-repo.git']]
)
Did this fix it?
Full steps for this cause: check, fix, verify

Short answer

"error: index-pack died of signal 15" means something sent SIGTERM to git while it was still receiving the pack, so the clone was killed, not corrupted. In Jenkins the usual killer is the Git plugin's 10-minute clone and fetch timeout; in scripts, a timeout wrapper. Raise the timeout or use a shallow clone (git 2.56).

  • Applies to git 2.56, Jenkins Git plugin (scmGit cloneOption), GNU coreutils timeout
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Which cause do you have?

Save the failed build's console output as build.log and find the git command Jenkins ran: the Git plugin prints the timeout it used at the end of that line. Compare it with how long the step ran. No such line, but a timeout wrapper in your own script, points to cause 2.

Run this first
grep -n "# timeout=\|died of signal" build.log
grep -rn "timeout [0-9]" Jenkinsfile scripts/ 2>/dev/null

Then find the line you see in this list and open its fix:

  1. 1The Jenkins Git plugin's 10-minute clone and fetch timeout ran outThe log shows a line such as > git fetch ... # timeout=10, and the failure comes about ten minutes after it
  2. 2A timeout wrapper in your script stops git before the transfer endsThe job runs git through timeout (for example timeout 300 git clone ...), and the clone dies exactly when that duration is reached

What does the error look like?

  • error: index-pack died of signal 15
  • fatal: index-pack failed

Cause 1 of 2

The Jenkins Git plugin's 10-minute clone and fetch timeout ran out

You seeThe log shows a line such as > git fetch ... # timeout=10, and the failure comes about ten minutes after it

Check

index-pack died of signal 15 in a Jenkins job usually means the Git plugin hit its limit. Its clone and fetch operations default to a 10-minute timeout, and when the limit passes Jenkins stops the process; on Unix agents Jenkins first sends SIGTERM, which is signal 15. A big repository, many tags or a slow network to the Git server makes the clone outlast it.

Check
grep -n "# timeout=" build.log

Fix

Give clone and fetch more minutes and download less. In a Pipeline set timeout, shallow and depth on cloneOption; noTags also trims the transfer. To change the default for every job, set the org.jenkinsci.plugins.gitclient.Git.timeOut property on the controller and on every agent.

Fix
checkout scmGit(
    branches: [[name: '*/main']],
    extensions: [ cloneOption(shallow: true, depth: 1, noTags: true, timeout: 30) ],
    userRemoteConfigs: [[url: 'https://github.com/example/big-repo.git']]
)

Verify

The new log line ends with # timeout=30 and the checkout finishes without the signal 15 error.

Verify
grep -n "# timeout=30" build.log

Confirmed by jenkins.io

Did this fix it?

Cause 2 of 2

A timeout wrapper in your script stops git before the transfer ends

You seeThe job runs git through timeout (for example timeout 300 git clone ...), and the clone dies exactly when that duration is reached

Check

GNU timeout sends the TERM signal to its command when the duration expires unless another signal is given. git's run-command code then reports the child that was stopped, here index-pack, as died of signal 15.

Check
grep -rn "timeout .*git \(clone\|fetch\)" .

Fix

Raise the duration to fit the real clone time, and shrink the clone with --depth so less data has to arrive in that window.

Fix
timeout 1800 git clone --depth 1 --branch main https://github.com/example/big-repo.git

Verify

The clone completes and git log shows the latest commit.

Verify
git -C big-repo log --oneline -1

Confirmed by man7.org

Did this fix it?

How do I stop it coming back?

  • Set cloneOption(shallow: true, depth: 1) in every Pipeline that only builds the latest commit.
  • Keep clone timeouts in one shared library or config value, and log the clone's duration so growth shows up before it hits the limit.
  • Store large binaries outside the repository so pack size stays small enough for CI clones.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.