Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is Teamcity not able to pull down git submodule

I have a git project that has a submodule. This submodule is used in two repositories that are both being built on a Teamcity server. Teamcity is able to build the first project but the the second project has the following error (details have been qouted out to protect the guilty)

Error collecting changes for VCS repository 'TirePlotter' Collecting changes failed: org.eclipse.jgit.errors.CorruptObjectException: Object 'git hash here' is corrupt: 'git fetch' command failed. stderr: 'project submodule name url': 'project submodule name url'/info/refs?service=git-upload-pack not found « Hide stacktrace jetbrains.buildServer.vcs.VcsException: Error collecting changes for VCS repository 'TirePlotter' Collecting changes failed: org.eclipse.jgit.errors.CorruptObjectException: Object 'git hash here' is corrupt: 'git fetch' command failed. stderr: 'project submodule name url': 'project submodule name url'/info/refs?service=git-upload-pack not found at jetbrains.buildServer.buildTriggers.vcs.git.OperationContext.wrapException(OperationContext.java:139) at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.collectChanges(GitVcsSupport.java:142) at jetbrains.buildServer.vcs.CollectRepositoryChangesByCheckoutRulesAdapter.collectChanges(CollectRepositoryChangesByCheckoutRulesAdapter.java:5) at jetbrains.buildServer.vcs.CollectChangesBetweenRepositoriesAdapter.collectChanges(CollectChangesBetweenRepositoriesAdapter.java:6) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges$CollectChangesInSingleRepository.perform(LoadChanges.java:2) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.perform(LoadChanges.java:60) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChangesForCheckoutRules(LoadChanges.java:46) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChanges(LoadChanges.java:20) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.run(LoadChanges.java:105) at jetbrains.buildServer.buildTriggers.vcs.VcsRootChangesLoader._loadChanges(VcsRootChangesLoader.java:31) at jetbrains.buildServer.buildTriggers.vcs.VcsRootChangesLoader.loadChanges(VcsRootChangesLoader.java:43) at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.doLoadChanges(VcsChangesLoaderImpl.java:94) at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.loadChangesNoLocking(VcsChangesLoaderImpl.java:16) at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.loadChanges(VcsChangesLoaderImpl.java:133) at jetbrains.buildServer.vcs.impl.VcsManagerImpl.loadChanges(VcsManagerImpl.java:604) at jetbrains.buildServer.serverSide.impl.auth.SecuredVcsManager.loadChanges(SecuredVcsManager.java:72) at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$1.run(VcsModificationChecker.java:11) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: org.eclipse.jgit.errors.CorruptObjectException: Object 'Git hash here' is corrupt: 'git fetch' command failed. stderr: 'project submodule name url': 'project submodule name url'/info/refs?service=git-upload-pack not found at jetbrains.buildServer.buildTriggers.vcs.git.submodules.SubmoduleAwareTreeIterator.movedToEntry(SubmoduleAwareTreeIterator.java:187) at jetbrains.buildServer.buildTriggers.vcs.git.submodules.DirectSubmoduleAwareTreeIterator.next(DirectSubmoduleAwareTreeIterator.java:86) at org.eclipse.jgit.treewalk.AbstractTreeIterator.skip(AbstractTreeIterator.java:628) at org.eclipse.jgit.treewalk.TreeWalk.skipEntriesEqual(TreeWalk.java:944) at org.eclipse.jgit.treewalk.TreeWalk.next(TreeWalk.java:554) at jetbrains.buildServer.buildTriggers.vcs.git.ModificationDataRevWalk.getCommitChanges(ModificationDataRevWalk.java:152) at jetbrains.buildServer.buildTriggers.vcs.git.ModificationDataRevWalk.createModificationData(ModificationDataRevWalk.java:91) at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getModifications(GitVcsSupport.java:164) at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.collectChanges(GitVcsSupport.java:140) ... 21 more Caused by: jetbrains.buildServer.vcs.VcsException: 'git fetch' command failed. stderr: 'project submodule name url': 'project submodule name url'/info/refs?service=git-upload-pack not found at jetbrains.buildServer.buildTriggers.vcs.git.CommandLineUtil.getCommandLineError(CommandLineUtil.java:44) at jetbrains.buildServer.buildTriggers.vcs.git.FetchCommandImpl.fetchInSeparateProcess(FetchCommandImpl.java:132) at jetbrains.buildServer.buildTriggers.vcs.git.FetchCommandImpl.fetch(FetchCommandImpl.java:70) at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.fetch(GitVcsSupport.java:716) at jetbrains.buildServer.buildTriggers.vcs.git.submodules.TeamCitySubmoduleResolver.fetch(TeamCitySubmoduleResolver.java:79) at jetbrains.buildServer.buildTriggers.vcs.git.submodules.SubmoduleResolver.getSubmoduleCommit(SubmoduleResolver.java:76) at jetbrains.buildServer.buildTriggers.vcs.git.submodules.SubmoduleAwareTreeIterator.getSubmoduleCommit(SubmoduleAwareTreeIterator.java:224) at jetbrains.buildServer.buildTriggers.vcs.git.submodules.SubmoduleAwareTreeIterator.movedToEntry(SubmoduleAwareTreeIterator.java:174) ... 29 more org.eclipse.jgit.errors.CorruptObjectException: Object 'git hash here' is corrupt: 'git fetch' command failed. stderr: 'project submodule name url': 'project submodule name url'/info/refs?service=git-upload-pack not found at jetbrains.buildServer.buildTriggers.vcs.git.submodules.SubmoduleAwareTreeIterator.movedToEntry(SubmoduleAwareTreeIterator.java:187) at jetbrains.buildServer.buildTriggers.vcs.git.submodules.DirectSubmoduleAwareTreeIterator.next(DirectSubmoduleAwareTreeIterator.java:86) at org.eclipse.jgit.treewalk.AbstractTreeIterator.skip(AbstractTreeIterator.java:628) at org.eclipse.jgit.treewalk.TreeWalk.skipEntriesEqual(TreeWalk.java:944) at org.eclipse.jgit.treewalk.TreeWalk.next(TreeWalk.java:554) at jetbrains.buildServer.buildTriggers.vcs.git.ModificationDataRevWalk.getCommitChanges(ModificationDataRevWalk.java:152) at jetbrains.buildServer.buildTriggers.vcs.git.ModificationDataRevWalk.createModificationData(ModificationDataRevWalk.java:91) at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getModifications(GitVcsSupport.java:164) at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.collectChanges(GitVcsSupport.java:140) at jetbrains.buildServer.vcs.CollectRepositoryChangesByCheckoutRulesAdapter.collectChanges(CollectRepositoryChangesByCheckoutRulesAdapter.java:5) at jetbrains.buildServer.vcs.CollectChangesBetweenRepositoriesAdapter.collectChanges(CollectChangesBetweenRepositoriesAdapter.java:6) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges$CollectChangesInSingleRepository.perform(LoadChanges.java:2) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.perform(LoadChanges.java:60) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChangesForCheckoutRules(LoadChanges.java:46) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChanges(LoadChanges.java:20) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.run(LoadChanges.java:105) at jetbrains.buildServer.buildTriggers.vcs.VcsRootChangesLoader._loadChanges(VcsRootChangesLoader.java:31) at jetbrains.buildServer.buildTriggers.vcs.VcsRootChangesLoader.loadChanges(VcsRootChangesLoader.java:43) at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.doLoadChanges(VcsChangesLoaderImpl.java:94) at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.loadChangesNoLocking(VcsChangesLoaderImpl.java:16) at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.loadChanges(VcsChangesLoaderImpl.java:133) at jetbrains.buildServer.vcs.impl.VcsManagerImpl.loadChanges(VcsManagerImpl.java:604) at jetbrains.buildServer.serverSide.impl.auth.SecuredVcsManager.loadChanges(SecuredVcsManager.java:72) at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$1.run(VcsModificationChecker.java:11) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: jetbrains.buildServer.vcs.VcsException: 'git fetch' command failed. stderr: https://[email protected]/rcrenterprises/RCR.Simulation: https://[email protected]/rcrenterprises/RCR.Simulation/info/refs?service=git-upload-pack not found at jetbrains.buildServer.buildTriggers.vcs.git.CommandLineUtil.getCommandLineError(CommandLineUtil.java:44) at jetbrains.buildServer.buildTriggers.vcs.git.FetchCommandImpl.fetchInSeparateProcess(FetchCommandImpl.java:132) at jetbrains.buildServer.buildTriggers.vcs.git.FetchCommandImpl.fetch(FetchCommandImpl.java:70) at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.fetch(GitVcsSupport.java:716) at jetbrains.buildServer.buildTriggers.vcs.git.submodules.TeamCitySubmoduleResolver.fetch(TeamCitySubmoduleResolver.java:79) at jetbrains.buildServer.buildTriggers.vcs.git.submodules.SubmoduleResolver.getSubmoduleCommit(SubmoduleResolver.java:76) at jetbrains.buildServer.buildTriggers.vcs.git.submodules.SubmoduleAwareTreeIterator.getSubmoduleCommit(SubmoduleAwareTreeIterator.java:224) at jetbrains.buildServer.buildTriggers.vcs.git.submodules.SubmoduleAwareTreeIterator.movedToEntry(SubmoduleAwareTreeIterator.java:174) ... 29 more jetbrains.buildServer.vcs.VcsException: 'git fetch' command failed. stderr: 'project submodule name url': 'project submodule name url'/info/refs?service=git-upload-pack not found at jetbrains.buildServer.buildTriggers.vcs.git.CommandLineUtil.getCommandLineError(CommandLineUtil.java:44) at jetbrains.buildServer.buildTriggers.vcs.git.FetchCommandImpl.fetchInSeparateProcess(FetchCommandImpl.java:132) at jetbrains.buildServer.buildTriggers.vcs.git.FetchCommandImpl.fetch(FetchCommandImpl.java:70) at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.fetch(GitVcsSupport.java:716) at jetbrains.buildServer.buildTriggers.vcs.git.submodules.TeamCitySubmoduleResolver.fetch(TeamCitySubmoduleResolver.java:79) at jetbrains.buildServer.buildTriggers.vcs.git.submodules.SubmoduleResolver.getSubmoduleCommit(SubmoduleResolver.java:76) at jetbrains.buildServer.buildTriggers.vcs.git.submodules.SubmoduleAwareTreeIterator.getSubmoduleCommit(SubmoduleAwareTreeIterator.java:224) at jetbrains.buildServer.buildTriggers.vcs.git.submodules.SubmoduleAwareTreeIterator.movedToEntry(SubmoduleAwareTreeIterator.java:174) at jetbrains.buildServer.buildTriggers.vcs.git.submodules.DirectSubmoduleAwareTreeIterator.next(DirectSubmoduleAwareTreeIterator.java:86) at org.eclipse.jgit.treewalk.AbstractTreeIterator.skip(AbstractTreeIterator.java:628) at org.eclipse.jgit.treewalk.TreeWalk.skipEntriesEqual(TreeWalk.java:944) at org.eclipse.jgit.treewalk.TreeWalk.next(TreeWalk.java:554) at jetbrains.buildServer.buildTriggers.vcs.git.ModificationDataRevWalk.getCommitChanges(ModificationDataRevWalk.java:152) at jetbrains.buildServer.buildTriggers.vcs.git.ModificationDataRevWalk.createModificationData(ModificationDataRevWalk.java:91) at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getModifications(GitVcsSupport.java:164) at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.collectChanges(GitVcsSupport.java:140) at jetbrains.buildServer.vcs.CollectRepositoryChangesByCheckoutRulesAdapter.collectChanges(CollectRepositoryChangesByCheckoutRulesAdapter.java:5) at jetbrains.buildServer.vcs.CollectChangesBetweenRepositoriesAdapter.collectChanges(CollectChangesBetweenRepositoriesAdapter.java:6) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges$CollectChangesInSingleRepository.perform(LoadChanges.java:2) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.perform(LoadChanges.java:60) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChangesForCheckoutRules(LoadChanges.java:46) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChanges(LoadChanges.java:20) at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.run(LoadChanges.java:105) at jetbrains.buildServer.buildTriggers.vcs.VcsRootChangesLoader._loadChanges(VcsRootChangesLoader.java:31) at jetbrains.buildServer.buildTriggers.vcs.VcsRootChangesLoader.loadChanges(VcsRootChangesLoader.java:43) at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.doLoadChanges(VcsChangesLoaderImpl.java:94) at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.loadChangesNoLocking(VcsChangesLoaderImpl.java:16) at jetbrains.buildServer.vcs.impl.VcsChangesLoaderImpl.loadChanges(VcsChangesLoaderImpl.java:133) at jetbrains.buildServer.vcs.impl.VcsManagerImpl.loadChanges(VcsManagerImpl.java:604) at jetbrains.buildServer.serverSide.impl.auth.SecuredVcsManager.loadChanges(SecuredVcsManager.java:72) at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$1.run(VcsModificationChecker.java:11) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

I have tried to rebuild it with a clean directory and verified that the git repository is fine. Does anyone have any ideas on how to fix this? Side note: the repositories are on github if that helps anyone.

like image 638
PlTaylor Avatar asked Dec 18 '12 12:12

PlTaylor


2 Answers

I've just had this same problem - in my case, we had TeamCity configured to use HTTPS and username/password auth when checking out Github repositories, but the .gitmodules file contained the SSH URL ([email protected]:MyCompany/Submodule.git) of the submodule repository.

I fixed it by editing .gitmodules and changing the URL to https://github.com/MyCompany/Submodule.git.

like image 187
Dylan Beattie Avatar answered Oct 03 '22 23:10

Dylan Beattie


Try adding .git to your submodule link: https://[email protected]/rcrenterprises/RCR.Simulation.git instead of https://[email protected]/rcrenterprises/RCR.Simulation.

like image 24
neverov Avatar answered Oct 04 '22 01:10

neverov