werf / werf

A solution for implementing efficient and consistent software delivery to Kubernetes facilitating best practices.
https://werf.io
Apache License 2.0
4.21k stars 202 forks source link

Error: "unable to switch work tree ... git reset failed: exit status 128 fatal: not a git repository ... .git/worktrees/worktree2" #3284

Open distorhead opened 3 years ago

distorhead commented 3 years ago
Error: phase build on image app stage install handler failed: cannot prepare worktree: unable to switch work tree /home/gitlab-runner/.werf/local_cache/git_worktrees/6/local/X/worktree to commit X: git reset failed: exit status 128
fatal: not a git repository: /home/gitlab-runner/builds/X/.git/worktrees/worktree2

Workaround: remove ~/.werf/local_cache and recreate git-worktree of the project.

Possible reason: broken state of git-worktree of the project due to removal of git-worktree of the project without cleaning up ~/.werf/local_cache/git_worktrees. Need more research to find the reason.

uzhinskiy commented 3 years ago

Hi! Any updates about this issue?