We have a TeamCity 7.1.5 and our Git Repositories are hosted on a TFS 2017. We wanted to switch to SSH authentication with a Public/Private key. So I have created an openSSH keypair and added the public key on my TFS user. On my local machine this works as expected.
But when I want to configure my TeamCity VCS Root to use SSH as well, I always get the following exception:
Failed for the root 'VCS ROOT' #830: List remote refs failed:
com.jcraft.jsch.JSchException: Algorithm negotiation fail
The private key is available on the TeamCity server and the config should be correct:
Host tfs.company.com
IdentityFile ~/.ssh/tfs.company.com_rsa_sha1
I have tried both Default Private Key and Private Key options, with and without passphrase.
The only thing I found is to upgrade the JSch library, but I couln't figure out how to upgrade this library and where to put the jar file.
Does anyone have similar issues or know how to upgrade the library?
Obviously the solution was very simple. I just needed to download the newest version
0.1.54of the JSch library from http://www.jcraft.com/jsch/ and put it intoC:\Program Files\TeamCity\webapps\ROOT\WEB-INF\lib. Restart TeamCity and everything works.