In general a good practice when it comes to security and logins is to use SSH keys. TeamCity gives you the option to use SSH keys in the VCS config but it won’t work straight away.
How to Configure TeamCity to Use an SSH key
These steps presume that you know a little about SSH keys and have already created your key pair.
In this particular TeamCity configuration the service was running under the local system and not a specific domain account.
- In TeamCity edit the VCS settings for your project and complete the following fields:
- On your TeamCity server ensure that you have copied your private key to the path you have specified in the above step
- All done!
If you don’t follow the above steps you’ll probably end up
Test connection failed in DevOps Team :: Puppet :: icis-core. List remote refs failed: com.jcraft.jsch.JSchException: java.io.FileNotFoundException: d:\SSH\id_rsa (The system cannot find the path specified)