无法使用TeamCity和一个git子模块进行构建 [英] Cannot build with TeamCity and one git submodule
问题描述
我正在尝试使用带有一个子模块的git
存储库在TeamCity 6.5.6
上进行构建,但是无法开始构建".
I'm trying to get a build going on TeamCity 6.5.6
with a git
repo with one submodule but getting "failed to start build."
.gitmodules
文件:
[submodule "src/shared-contracts"]
path = src/shared-contracts
url = gitolite@myserver:shared-contracts
Stacktrace:
Stacktrace:
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.
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.
I did a fresh clone locally, checked out the branch from the TC config and git submodule update --init
checked out the submodule correctly to src/shared-contracts.
有什么想法吗?
推荐答案
我更新到了TeamCity
7.1.3,该问题继续发生.
I updated to TeamCity
7.1.3 and the problem continued to occur.
我按照回答>如何删除子模块? /a>
I removed the submodule following the answer How do I remove a submodule?
然后我重新添加了它,但是这次将URL设置为
I then re-added it, but this time with URL set to
url = gitolite@myserver:shared-contracts.git
代替
url = gitolite@myserver:shared-contracts
,问题已解决.
这篇关于无法使用TeamCity和一个git子模块进行构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!