“Algorithm negotiation fail” with SSH authentication on TeamCity

谁说胖子不能爱 提交于 2019-12-07 09:18:08

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/44781559/algorithm-negotiation-fail-with-ssh-authentication-on-teamcity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!