Login/remote to your build server. Use the login under which you want the build agents to run.
If you are using TeamCity 5.0 and above the Git client is included with the install, you can skip to Configuration.
Copy the zip file to your .BuildServer/plugins directory
Stop and start the JetBrains Web Server service so that it detects the Git plugin.
Connect to your TeamCity website and go to the Projects page.
Select the project you want to configure to use Git and go to its Version control settings page.
Click to Edit the version control configuration.
Copy the clone url from your repository (e.g. GitHub).
Paste the clone url in to the TeamCity form.
Enter a directory name where Git should manage its files for this repository.
Enter the user name from your clone string.
Enter the location of your private ssh key.
Verify that the ssh key directory exists. If not, generate the key from a git bash shell:
Verify that the public key for this user is associated with your repository.
Open services and change your build agents to run under a local account.
Test the connection
Now do a test build on your project.