4

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?

Chamberlain
  • 881
  • 5
  • 17
Kevin Brechbühl
  • 4,717
  • 3
  • 24
  • 47
  • Algorithms in SSH is not only public key. There are more. You can investgate them from command line ssh very simply, but I believe you will be able to get some debug also from the jsch. First of all, I would try updating the client. – Jakuje Jun 27 '17 at 14:24

1 Answers1

4

Obviously the solution was very simple. I just needed to download the newest version 0.1.54 of the JSch library from http://www.jcraft.com/jsch/ and put it into C:\Program Files\TeamCity\webapps\ROOT\WEB-INF\lib. Restart TeamCity and everything works.

Kevin Brechbühl
  • 4,717
  • 3
  • 24
  • 47