在轮询SCM时将ssh-agent与jenkins一起使用 [英] Using ssh-agent with jenkins while polling SCM

查看:215
本文介绍了在轮询SCM时将ssh-agent与jenkins一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Jenkins ssh-agent插件向我的构建提供ssh凭据,这可以正常工作,但是我已将其设置为轮询scm(在本例中为bitbucket git)以检查更改.

Im using the Jenkins ssh-agent plugin in order to give ssh credentials to my builds which works perfectly, however I have it set up to poll the scm (in this case bitbucket git) in order to check for changes.

当然,要访问存储库以轮询更改,它也需要那些ssh凭据,我似乎无法在Wiki中找到与此相关的任何内容,但必须有一种方法.

And of course to access the repo in order to poll for changes it also needs those ssh credentials, I cant seem to find anything related to this in the wiki but there must be a way to do so.

对于他们来说,没有实现它似乎是一件很愚蠢的事情,毕竟,如果您需要ssh凭据来克隆和构建,您还需要它们进行轮询吗?

It seems like such a silly thing for them to not have implemented it, after all if you need ssh credentials to clone and build you would also need them to poll right?

推荐答案

从SSH密钥中删除密码短语是不可接受的步骤.

Removing the passphrase from the SSH key is an unacceptable step.

jenkins ssh-agent插件有望解决了这个问题,但据我所知,目前在轮询方面已被破坏:

The jenkins ssh-agent plugin is expected to solve this problem, but as far as I can tell it's currently broken where polling is concerned:

https://issues.jenkins-ci.org/browse/JENKINS-21226

从Jenkins 1.545开始,我还没有找到一种可行的,安全的方法来实现基于ssh的服务器通信,该通信还包括轮询.

I have not found a viable, secure means to implement ssh-based server communication that also covers polling, as of Jenkins 1.545.

这篇关于在轮询SCM时将ssh-agent与jenkins一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆