Instead of entering the username and password for every VCS root registered on JetBrains TeamCity it’s better to register an SSH Key for the communication with the VCS (Version Control System). To enable communication between VCS and JetBrains TeamCity 9.1 first a SSH key has to be created.
Create a SSH key
A manual for SSH key generation can be found on GitHub Help.
Add SSH key to VCS account
In a next step the public key has to be added to the VCS account, which will be used by TeamCity. From security point of view it’s recommended to create a separate account for the build server, so that permissions can be granted according to the build servers neeeds.
Add Private Key to TeamCity
Next the private key file has to be uploaded to the TeamCity server. To make the SSH key available in all projects on TeamCity the key has to be added to the “.
- Log in to your TeamCity server and go to the Administration board
- Select the “
- Navigate to SSH Keys
- Click Upload SSH Key and upload the private key
- Go to a projects VCS Root
5.1 Change the
Fetch URLto SSH (i.e.
5.2 Configure the Authenticaiton Setting so that the uploaded key will be used
IMPORTANT: Connection with SSH key is only working if username is empty!