出乎意料的是,我们的 TeamCity 2023.11.1 开始构建失败,因为它是
Unable to collect changes
Failed to collect changes, error: Error collecting changes for VCS repository '"vcsour-app2024-2" {instance id=146, parent internal id=33, parent id=our-company_Vcsour-app20242, description: "[email protected]:our-company/our-app.git#master"}'
'git fetch' command failed (repository dir: <TeamCity data dir>/system/caches/git/git-E920A8B4.git).
stderr: Failure updating tracking ref refs/heads/hotfix/pr-7175: Not a ref: refs/heads/feature/pr-6408:
elapsed time: 9s,015ms
exit code: 1, VCS root: "vcsour-app2024-2" {instance id=146, parent internal id=33, parent id=our-company_Vcsour-app20242, description: "[email protected]:our-company/our-app.git#master"}
Failed to collect changes, error: Error collecting changes for VCS repository '"vcsour-app2024-2" {instance id=146, parent internal id=33, parent id=our-company_Vcsour-app20242, description: "[email protected]:our-company/our-app.git#master"}'
'git fetch' command failed (repository dir: <TeamCity data dir>/system/caches/git/git-E920A8B4.git).
stderr: Failure updating tracking ref refs/heads/hotfix/pr-7175: Not a ref: refs/heads/feature/pr-6408:
elapsed time: 9s,015ms
exit code: 1, VCS root: "vcsour-app2024-2" {instance id=146, parent internal id=33, parent id=our-company_Vcsour-app20242, description: "[email protected]:our-company/our-app.git#master"}
问题是这个 TeamCity 实例本地的,我们有另一个没有问题的独立实例。
此错误发生在服务器将构建发送到代理之前。
尝试了一些不同的雨舞,包括更改 VCS 设置、重新创建 VCS,但修复它的是清除缓存文件夹
<TeamCity data dir>/system/caches/git