debugdockerMinor
Problem on gitlab-runner: cannot lock ref [...] Another git process seems to be running in this repository
Viewed 0 times
cannotproblemthisprocessgitlabseemsrefrunnerrunninganother
Problem
I got a problem on a gitlab-runner after pushing several commits:
Which command do I have to use to delete the
Running with gitlab-runner 11.4.0 (8af42251)
on GITLAB-RUNNER 58c31dfa
Using Docker executor with image registry.git.rwth-aachen.de/luechow-group/inpsights/gnu:7.3.0 ...
Pulling docker image registry.git.rwth-aachen.de/luechow-group/inpsights/gnu:7.3.0 ...
Using docker image sha256:8c48f31ac37d239cf7c072961068e85dd0af222604461b7c0df905a45e900877 for registry.git.rwth-aachen.de/luechow-group/inpsights/gnu:7.3.0 ...
Running on runner-58c31dfa-project-12102-concurrent-0 via GITLAB-RUNNER...
00:05
Fetching changes...
HEAD is now at 15dd3f8 .
error: cannot lock ref 'refs/remotes/origin/develop': Unable to create '/builds/luechow-group/inPsights/.git/refs/remotes/origin/develop.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.
From https://git.rwth-aachen.de/luechow-group/inPsights
! 62d2cd4..f2bb2fe develop -> origin/develop (unable to update local ref)
15dd3f8..0c2b081 feature/ElectronSelectorRebase -> origin/feature/ElectronSelectorRebase
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
error: cannot lock ref 'refs/remotes/origin/develop': Unable to create '/builds/luechow-group/inPsights/.git/refs/remotes/origin/develop.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: failed to run reflog
ERROR: Job failed: exit code 1Which command do I have to use to delete the
.lock file in the docker container and toSolution
The easiest solution for me was to execute
on the runner machine. The command removes all stopped docker containers and the
docker container pruneon the runner machine. The command removes all stopped docker containers and the
.lock files therein. Running a pipeline from gitlab.com then starts a new container. (Note that all caches will be lost).Context
StackExchange DevOps Q#10983, answer score: 3
Revisions (0)
No revisions yet.