“算法协商失败”在TeamCity上使用SSH身份验证

编程入门 行业动态 更新时间:2024-10-28 13:19:33
本文介绍了“算法协商失败”在TeamCity上使用SSH身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我们有一个TeamCity 7.1.5,我们的Git存储库托管在TFS 2017上。我们希望使用公钥/私钥切换到SSH身份验证。所以我创建了一个openSSH密钥对,并在我的TFS用户上添加了公钥。在我的本地机器上,这个按预期工作。

但是当我想要配置我的TeamCity VCS Root以使用SSH时,我总是会得到以下异常:

根'VCS ROOT'失败#830:列表远程引用失败: com.jcraft.jsch.JSchException:算法谈判失败

私人密钥在TeamCity服务器上可用, config 应该是正确的:

主机tfspany IdentityFile〜/ .ssh / tfspany_rsa_sha1

我已经尝试了默认私钥和私钥选项,带和不带密码。

我发现的唯一东西是升级 JSch 库,但我无法弄清楚如何升级这个库以及将jar文件放在哪里。

解决方案

很明显,解决方案非常简单。我只需要从 0.1.54 nofollow noreferrer> www.jcraft/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 tfspany IdentityFile ~/.ssh/tfspany_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 www.jcraft/jsch/ and put it into C:\Program Files\TeamCity\webapps\ROOT\WEB-INF\lib. Restart TeamCity and everything works.

更多推荐

“算法协商失败”在TeamCity上使用SSH身份验证

本文发布于:2023-10-13 00:40:23,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1486320.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:算法   身份验证   TeamCity   SSH

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!