TeamCity On-Premises
 
2025.03
Get TeamCity On-Premises

Configuring VCS Roots

Edit pageLast modified: 04 March 2025

A VCS root is a cornerstone of the TeamCity ←→ VCS repository communication. This integral element defines a connection to a VCS provider required to perform a wide range of operations: repository checkout, code sources tagging, communicating build statuses back to VCS, and so on.

VCS roots store the following information:

  • Fetch and push URLs that TeamCity uses to pull and push remote files.

  • Branch information: the list of repository branches TeamCity should track and which branch is the default (main) one.

  • Authentication settings: credentials TeamCity uses to access a repo.

  • Checkout settings: specify how remote files should be stored and whether submodules should be checked out along with the main repository.

  • Custom changes polling settings that allow you to override the default 60-second interval.

Sections related to VCS roots are available in both project and configuration settings.

Root settings in projects and configs

However, configurations never own roots. You can "attach" a VCS root to a configuration, but roots are always stored in (owned by) projects. This technique results in the following:

  • A VCS root can be attached to multiple configurations, meaning that multiple build configurations can access the same repository with the same auth and checkout settings.

  • A single configuration may have multiple VCS roots attached, which allows you to work with different repositories within one configuration.

  • Editing VCS roots affects all configurations that use it. When modifying VCS root settings, you have an option to duplicate this root and store updated settings in this new clone, keeping the original root unchanged. This allows you to customize one build configuration but leave other configurations that share this root unaffected.

Although a VCS root is an existential part of any build configuration that works with a remote repository, in many scenarios TeamCity generates roots automatically and does not require that you create them by hand for each new build configuration. See this tutorial for an example.