Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using ssh-agent with jenkins while polling SCM

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.

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.

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?

like image 382
Richy19 Avatar asked Mar 23 '23 04:03

Richy19


1 Answers

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

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

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

like image 200
Nathaniel Irons Avatar answered Apr 02 '23 10:04

Nathaniel Irons