“算法协商失败”在TeamCity上使用SSH身份验证 [英] "Algorithm negotiation fail" with SSH authentication on TeamCity
问题描述
我们有一个TeamCity 7.1.5,我们的Git存储库托管在TFS 2017上。我们希望使用公钥/私钥切换到SSH身份验证。所以我创建了一个openSSH密钥对,并在我的TFS用户上添加了公钥。在我的本地机器上,这个按预期工作。
但是当我想要配置我的TeamCity VCS Root以使用SSH时,我总是会得到以下异常:
根'VCS ROOT'失败#830:列表远程引用失败:
com.jcraft.jsch.JSchException:算法谈判失败
私人密钥在TeamCity服务器上可用, config
应该是正确的:
主机tfs.company.com
IdentityFile〜/ .ssh / tfs.company.com_rsa_sha1
我已经尝试了默认私钥
和私钥
选项,带和不带密码。
我发现的唯一东西是升级 JSch
库,但我无法弄清楚如何升级这个库以及将jar文件放在哪里。
很明显,解决方案非常简单。我只需要从 0.1.54 nofollow noreferrer> http://www.jcraft.com/jsch/ 并将其放入 C:\程序文件\TeamCity\webapps\ROOT\WEB-INF \lib
。重新启动TeamCity,一切正常。
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.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.
这篇关于“算法协商失败”在TeamCity上使用SSH身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!