我的“源代码 checkout ”Bamboo 任务间歇性失败,并出现各种与 git 相关的错误,包括:
-
fatal: not a git repository (or any of the parent directories): .git
-
Can't create local repository folder E:\bamboo-build-dir\_git-repositories-cache\<GUID>
异常(exception)情况表明工作目录是 \git-repositories-cache\<GUID>
最佳答案
在以下情况下可能会发生这种情况:
- 存储库设置下的“在远程代理上启用存储库缓存”为 true
- 多个“源代码 checkout ”任务同时并行运行
在这种情况下,Bamboo 中似乎存在一个错误,因为它无法正确处理 git 存储库缓存的同时更新。当多个线程尝试同时在缓存上执行 git 命令时,会发生这些间歇性错误。
此错误的解决方法是取消选中“在远程代理上启用存储库缓存”。
有关此功能的背景信息,请参阅:https://confluence.atlassian.com/bamkb/how-stored-git-caches-speed-up-builds-690848923.html
关于git - Bamboo 在源代码检查任务中间歇性失败并显示 "not a git repository (or any of the parent directories): .git",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58722365/