title: Why is Teamcity not able to pull down git submodule
body: <p>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)</p>
  
  <blockquote>
    <p>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: <a href="https://engdeveloper@github.com/rcrenterprises/RCR.Simulation">https://engdeveloper@github.com/rcrenterprises/RCR.Simulation</a>: <a href="https://engdeveloper@github.com/rcrenterprises/RCR.Simulation/info/refs?service=git-upload-pack">https://engdeveloper@github.com/rcrenterprises/RCR.Simulation/info/refs?service=git-upload-pack</a> 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)</p>
  </blockquote>
  
  <p>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.</p>