我们有一个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 failThe private key is available on the TeamCity server and the config should be correct:
Host tfspany IdentityFile ~/.ssh/tfspany_rsa_sha1I 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身份验证
发布评论