Azure DevOps | CI - Pipeline failing on checkout
I configured CI build for every pull request, which started failing suddenly with the below sets of errors.
error: cannot lock ref 'refs/remotes/origin/release': there is a non-empty directory '.git/refs/remotes/origin/release' blocking reference 'refs/remotes/origin/release' ! [new branch] release -> origin/release (unable to update local ref) ##[warning]Git fetch failed with exit code 1, back off 9.729 seconds before retry. git -c http.extraheader="AUTHORIZATION: bearer ***" fetch --force --tags --prune --progress --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/pull/2476/merge:refs/remotes/pull/2476/merge error: cannot lock ref 'refs/remotes/origin/release': there is a non-empty directory '.git/refs/remotes/origin/release' blocking reference 'refs/remotes/origin/release' I tried cleaning the checkout dir in my custom Azure DevOps build agent. After a lot of searching. I found the root cause.