Issue Summary
A lot of customers have complained of build failures on Windows remote agents because of source code checkout tasks failing because of "fatal:not a git repository" error.
The error seems to relate to Bamboo not being able to checkout GIT repositories because of an incorrect cache, Bamboo tries to clean the cache folder and this process runs in loops and finally, the checkout fails.
Below error is seen in the logs :
Checking out into C:\Users\bamboo\bamboo-agent-home\xml-data\build-dir\PRO-PLAN\test-dir Updating source code to revision: 454a465b94d58c0bfecaccea70897ace5cbd29a9 Fetching 'refs/heads/master' from 'ssh://git@10.10.2.2:7999/bam/test-repo.git'. fatal: not a git repository (or any of the parent directories): .git Cannot fetch branch 'refs/heads/master' from 'ssh://git@10.10.2.2:7999/bam/test-repo.git' to source directory
Steps to Reproduce
Run the build on a Windows remote agent with a corrupted cache.
Expected Results
Build should succeed
Actual Results
Build fails with error "fatal : not a git repository"
Workaround
- The first step is to clear the GIT Cache on the Windows remote agent, Please refer Git cache removal in Bamboo
- Post clearing the cache, please rerun the build.
- After clearing the cache if the same error is seen again, please disable repository caching on the remote agent by going to Overview >> Linked Repositories >> Select a repository and click on Advanced options and uncheck the option for "Enable repository caching on agents".
- is duplicated by
-
BAM-21540 Checkout retry fails
- Closed
- Mentioned in