TeamCity v7 hangs on agent side checkout using Git


This morning I upgraded our TC instance from v6.5 to v7.  Since then all builds have hung during the checkout process.  The build cannot be stopped from the UI.  It is necessary to stop the TeamCity Web Server and Build Agent services, which both end with an error.  Afterwards it is necessary kill both the ssh and git processes and manually delete the build agent's work directory before the build will complete successfully.  The build will complete successfully once after this is done, but will then hang the next time and these steps will need to be repeated.

Here is some information about my configurations:

  • All code is stored in GitHub
  • Each build configuration contains two VCS roots, which each checkout into their own subdirectory using a checkout rule
  • Checkout mode is "automatically on agent"
  • Checkout directory is "auto"
  • I am NOT "cleaning all files before build"
  • I'm authenticating with github using "default private key"
  • my clean policy is "always" and my clean files policy is "all untracked files"

I recently updated another TeamCity instance from v6.5 to v7 and have experienced no problems.  Although this instance works with the same repos on GitHub, it does have the following differences:

  • It does NOT use multiple VCS roots per configuration.
  • It uses server side checkout instead of agent side.

We actually use this instance of TeamCity to deploy our products to our production environments so we're pretty hampered by this.  Any help any one could provide would be greatly appreciated.

Thanks in advance,
Comment actions Permalink

For anyone else who runs into this, you can set "Clean all files before build" to true on the Version Control Settings page to work around the problem.  Not ideal since it significantly increases the build time, but it works.

Comment actions Permalink

I've encountered the same issue in a very similar situation (github, default key, agent checkout).  our server side checkout jobs work just fine.

I've dug into logs and it appears to block at `git ls-remote --tags`

Defininately seems to be a bug with v7, we upgraded from 6.5.5


This is the timeout in the logs.  I've upgraded git from 1.7.6 to 1.7.9 without any luck

[2012-03-06 19:39:19,205]   INFO -      jetbrains.buildServer.VCS - Run command: "C:\Program Files (x86)\Git\bin\git.exe" ls-remote --tags origin 
[2012-03-06 20:39:19,218]   WARN -      jetbrains.buildServer.VCS - '"C:\Program Files (x86)\Git\bin\git.exe" ls-remote --tags origin' command failed.
exception: Timeout exception 
[2012-03-06 20:39:19,218]   INFO -      jetbrains.buildServer.VCS - Run command: "C:\Program Files (x86)\Git\bin\git.exe" tag -d <SNIPPED>
Comment actions Permalink


it seems like you pinpointed a real cause of the error: we did 'git ls-remote' without authorization. Could you please install an attached build of plugin and check if it helps?

Comment actions Permalink

Hi Dmitry,

Thanks for the quick response.  I replaced the old file here: C:\TeamCity\webapps\ROOT\WEB-INF\plugins, once the agent upgraded, the build ran successfully.  Thanks!

Comment actions Permalink

Thanks, Dimitry and Todd!

I've also installed the plugin and it seems to have corrected our issues as well!  We're now able to checkout without forcing a Clean All Files before each checkout.


Comment actions Permalink

This fixed the hang for me as well.  Thanks.


Please sign in to leave a comment.