Jenkins: A Git process may have crashed in the repository
03 February 2021
Updated: 03 September 2023
Taken from this StackOverflow answer
Sometimes when using Jenkins a Git process may crash or timeout resulting in an error message like the above one. This can result in issues when running later Git steps or running other Git steps in the repository in the Jenkins workspace
The simplest way I’ve found to fix this is to simply delete the .git/index.lock
or .git/shallow.lock
file from the workspace that’s giving the issue and run again