Open
Description
If the process dies while updating the local Git config file, the working directory for the current runner may be corrupted (.git/config.lock
keeps existing) and actions/checkout@v4 will always fail.
We had the following error while running a GitHub action in a Docker container:
Run actions/checkout@v4
[...]
Setting up auth
[...]
Error: error: could not lock config file .git/config: File exists
How to reproduce
Create the lockfile in the action-runner working directory: touch .git/config.lock
to simulate the corrupted state when the process dies during checkout.
Start some workflow running "actions/checkout@v4".
Expected behavior
actions/checkout@v4 detects the corrupted state and removes the whole repository.
Actual behavior
Error.
Workaround
Manually clean the working directory of the action-runner.
Activity