Skip to content

index.lock file not deleted before fetch

Summary

GitLab runner fails to fetch changes because 'index.lock' file exists. Needs to be manually deleted to resolve.

Believed to be fixed in #1166 (closed) but am seeing it in version 10.6.0

Steps to reproduce

Actual behavior

Running with gitlab-runner 10.6.0 (a3543a27)
  on Tester 2d2a211d
Using Shell executor...
Running on Tester...
Fetching changes...
fatal: Unable to create 'c:/tools/gitlab_runner/builds/2d2a211d/0/software/Tester/.git/index.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
Checking out 0de6c321 as increment_index...
fatal: Unable to create 'c:/tools/gitlab_runner/builds/2d2a211d/0/software/Tester/.git/index.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
ERROR: Job failed: exit status 128

Expected behavior

Relevant logs and/or screenshots

Environment description

  • GitLab CE
  • GitLab Runner on PC running Windows 7

Used GitLab Runner version

10.6.0

Edited by 🤖 GitLab Bot 🤖