-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pipeline: GitHub plugin doesn't respect Jenkins update center proxy settings #66
Comments
These properties are intended for the JVM's URLConnection and don't HAVE to be honored by anything else, however I'll take a look and see what is required to have them be applied when present. |
Hi @aaronjwhiteside, thanks for looking into this! |
@ababushk your note about using the Script Console helped spotting the issue as we only have the Jenkins HTTP proxy settings enabled in the UI without passing the properties to JVM. I could confirm it by using the script console. Without the proxy the Plugin fails hard as the Github API is behind a authorization tenant that will return a website to login. Further debugging? Almost not possible as you would have to go on the network level or spot some log from the underlying plugins in the hope to see something from the received payload. The error triggered through this plugin is rather cryptic while the reasons is a plain simple json error as the the API was not reachable and the returned value is the login form html page. I think catching this error by the plugin combined with a warning, that there might be a wrong or missing proxy setting would make the developer experience much better. I have no experience with jenkins plugin development nor much java experience, so I just let this proposal here 🙏 I also let the error message here, to help people finding this issue as I wasn't able find anything on the github platform related to jenkins plugins while searching for it.
Here a longer exception excerpt, the full stack trace is too long and goes beyond the relevant parts I think.
|
FYI there is a PR now pending fixing exactly this issue and make the plugin aware of the jenkins proxy settings 💪 It's already linked to this issues #92 |
Pipeline: GitHub plugin doesn't use HTTP proxy settings which are set in Jenkins settings to connect to GitHub API.
As a workaround you should use JVM properties by passing them to Jenkins launch string:
or by setting them via Script Console
The text was updated successfully, but these errors were encountered: