git - Bamboo 在源代码检查任务中间歇性失败并显示 "not a git repository (or any of the parent directories): .git"

标签 git bamboo

我的“源代码 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>

最佳答案

在以下情况下可能会发生这种情况:

  1. 存储库设置下的“在远程代理上启用存储库缓存”为 true
  2. 多个“源代码 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/

相关文章:

git - 将具有公共(public)主干的大型 SVN 存储库迁移到 Git

git - 如何 pull 入非当前分支?

java - 如何在 Bamboo 部署后运行脚本?

git - 如何只列出两个分支之间新添加的文件

git - 'git remote add' 不创建 repo

linux - Bamboo :错误:找不到或加载主类 org.apache.tools.ant.launch.Launcher

python - 使用 Windows 系统用户上传到自定义 PyPi 存储库

Bamboo Atlassian : How to share a variable between stages

msdeploy - 尝试使用Bamboo和MSDeploy

Git:将存储库更新到特定版本