Closed rlopez4 closed 4 years ago
@rlopez4 our apologies for late response; somehow missed it. Were you able to find a work around or still stuck?
also did you try to change payload from urlencoded to json in github?
Hey guys, I ended up just managing webhooks manually.
Facing same issue, switching from urlencoded to json in github is not solving. Also disabling the authentication does not help.
Unfortunately I am unable to get it working when deploying on k8s cluster. With authentication the webhooks do not work returning 400 without authentication they go through when using urlencoded but the job is not triggered due to the problem on the webproxy:
Error Redirecting '/github-webhook' to upstream', Upstream Redirect Status: 405 Method Not Allowed
So not much of a use so far for me.
Error Redirecting '/github-webhook' to upstream', Upstream Redirect Status: 405 Method Not Allowed
Check that the webhook you configured in Jenkins has a trailing /
. That bit wasted 2 days of my life.
Error Redirecting '/github-webhook' to upstream', Upstream Redirect Status: 405 Method Not Allowed
Check that the webhook you configured in Jenkins has a trailing
/
. That bit wasted 2 days of my life.
@PatTheSilent Thanks for saving me 2 days of life! :D
Thanks for helping @PatTheSilent, I have added this in the troubleshooting sections of the readme for people who face this issue in the future.
https://github.com/stakater/GitWebhookProxy/blob/master/README.md#troubleshooting
I am using / in the end , still the problem persists
Even with /
at the end did not work, make sure the url match in GitWebhookProxy upstreamURL
and Jenkins setting "Override Hook URL 'Specify another hook URL for GitHub configuration' "
in our case the 's' in https was missing.
When attempting to override the Web hook url for the Github plugin a 400 response is returned. The gitwebhookproxy logs show that this is because of missing headers. The Github plugin is trying to validate the endpoint by sending a request with a test header: https://github.com/jenkinsci/github-plugin/blob/master/src/main/java/org/jenkinsci/plugins/github/config/GitHubPluginConfig.java#L214-L241