How to make work TeamCity Agent on Windows with Git through SSH
1. Run TeamCity Agent not from System account
2. This account must have a PuTTY session stored with SSH key
3. Server’s key must be cached by the TeamCity agent acount. Run plink in console and point plink to the target server.
plink -agent -i c:\[path-to-key]\my_teamcity_private_key.ppk bitbucket.org
Confirm key caching ‘y’