Since TeamCity 8.1, TeamCity can automatically discover the VCS type and settings from the repository URL.
When configuring a VCS root, select the Guess from Repository URL option from the drop-down and specify the URL. TeamCity will recognize the URL for a supported version control and will create a VCS root automatically. After the VCS Root is created, you can modify its settings using the Project Settings or Build Configuration Settings page.
The currently supported VCS are Git, Mercurial, and Subversion.
note
For Git that uses SSH authentication, create a VCS Root from URL first and then open its settings to specify the SSH key to be used. Alternatively, create a Git VCS Root manually.