2

Github Webhook (currently disabled) is connected to Jenkins Server. One of the successful requests is pull request create.

I am trying to reproduce the same request and see if it succeeds by trying the same request (URL, headers and payload) on Postman. But it fails giving the error

Error 400 Provided signature [<signature>] did not match to calculated

Context: In order to find a way to discover a branch in Jenkins, I am trying to see if I can use HTTP request to forward the request from Lambda to Jenkins (currently my Github webhook points to a Lambda function which needs to somehow notify Jenkins that a new PR is created so branch re-indexing is required so that the new PR branch is discovered allowing it to be triggered later)

mirekphd
  • 4,799
  • 3
  • 38
  • 59
Chaitanya Bapat
  • 3,381
  • 6
  • 34
  • 59

1 Answers1

0

It happens to me after internet domain change (e.g. from https://jenkins.mydomain.com:<PORT> to https://jenkins.mydomain.org:<PORT>) in the Payload URL field on Github's Webhooks > Manage webhook page.

A workaround (which is at least 5 years old, see my source) is to use Settings > Content type drop-down menu to switch the content-type from the default application/x-www-form-urlencoded to application/json.

mirekphd
  • 4,799
  • 3
  • 38
  • 59