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?
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:
I have not found a viable, secure means to implement ssh-based server communication that also covers polling, as of Jenkins 1.545.