Closed shorn closed 8 years ago
I tried your work-around for this issue but now it cannot connect with the server, always giving me: Jenkins Service Call failed
Invalid password/token for user:
Did you encounter this?
I think ignoring SSL certs is not the right solution for this problem. We just updated our SSL certs. Please try again and let me know if it works for you.
The problem wasn't on your side - it was that the cert was self-signed (unless your new configuration allows self-signed certs somehow?)
Sometimes bad configuration happens and it's not under your control - that's why the RestClient API themselves added the ignoreSSLIssues() option in the first place.
In my case at the time, the issue with the certificate was known and deemed temporarily acceptable - but there was no easy way to tell the plugin "yes, I know there are cert issues - it's fine, don't worry about it."
Possible solutions:
Upgrade http-builder with configuration option: Upgrade to recent version of http-builder (0.7.1+) and adding a configuration option to tell the serviceFactory to apply ignoreSSLIssues().
Add configuration option without upgrading http-builder Easy enough to implement your own method that does what ignoreSSLIssues() method does.
Provide easier way to customise the RESTClient Iterating all the gradle-jenkins-plugin tasks and using a custom ServiceFactory is a lot of jiggery-pokery to have to do just to customise the HTTP connection.
This is the work-around I'm using in my buildscript at the moment:
Happy to provide a proper pull request if you're open to it.