11

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.

3 Answers 3

11

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Using relative paths may also help users (assuming the repos are convenient to access relative to each other) using for example url=../submodule.git
2

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

4 Comments

Found this link to change the gitmodules file, stackoverflow.com/questions/913701/… but it is still failing with this commang Failed to collect changes, error: Error collecting changes for VCS repository 'TIrePlotter' Collecting changes failed: org.eclipse.jgit.errors.CorruptObjectException: Repository '[email protected]/rcrenterprises/TirePlotter.git' has submodule in commit '0fa7a5b84bd6037d0e063ad3ad6b47fccabbbbd2' at path 'RCR.Simulation', but has no entry for this path in .gitmodules configuration.
It seems like there is no entry in .gitmodules for subrepository at path RCS.Sumulation, I'd try to add it.
contents of .gitmodules on server [submodule "RCR.Simulation"] path = RCR.Simulation url = github.com/rcrenterprises/RCR.Simulation.git
I have the same issue, but this is not the solution. youtrack.jetbrains.com/issue/TW-36303
1

We have the same problem after subtree merge: : VCS Root: DPPDev: Commit 'c77771ccd2f5b23aae5eafc3d4bf4cb6e6d6fec4' is not found in repository.

Added "empty" commit for fix - then success

1 Comment

This worked for me. Specifically, I had to add a commit to the submodule's repo, not the repo where the submodule is used..

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.