无法使用TeamCity和一个git子模块构建

时间:2013-02-06 08:23:53

标签: git teamcity

我正在尝试在TeamCity 6.5.6上使用git repo和一个子模块进行构建,但是“无法启动构建。”

.gitmodules档案:

[submodule "src/shared-contracts"]
path = src/shared-contracts
url = gitolite@myserver:shared-contracts

堆栈跟踪:

Failed to start build: Server was not able to build correct patch, most likely due to VCS errors, will try again. jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl$1: Server was not able to build correct patch, most likely due to VCS errors, will try again.

Caused by: jetbrains.buildServer.vcs.patches.UnsuccessfulPatchException: Failed to build patch for build #s5 {build id=19947}, VCS root: gitolite@myserver:myrepo#mapi-qa {instance id=1152, parent id=280}, due to error: Patch building failed: org.eclipse.jgit.errors.CorruptObjectException: Repository 'gitolite@myserver:myrepo' has submodule in commit 'c8f8416d86e3ed274302ff2f316792a37f041322' at path 'src/shared-contracts', but has no entry for this path in .gitmodules configuration.

我在本地做了一个新的克隆,从TC配置中检出了分支,git submodule update --init正确地检查了子模块到src / shared-contracts。

有什么想法吗?

1 个答案:

答案 0 :(得分:5)

我更新到TeamCity 7.1.3并且问题仍然存在。

我在答案How do I remove a submodule?

后删除了子模块

然后我重新添加了它,但这次将URL设置为

url = gitolite@myserver:shared-contracts.git

而不是

url = gitolite@myserver:shared-contracts问题已解决。