4

I have Jenkins set up locally and I am using ngrok to create a tunnel. I know it is working because if I put the url from the session in my browser it redirects to my local Jenkins dashboard. I also get 200 messages in my Terminal window:

POST /ajaxBuildQueue           200 OK                                                                            
POST /ajaxExecutors            200 OK                                                                            
POST /ajaxExecutors            200 OK                                                                            
POST /ajaxBuildQueue           200 OK  

but when I go to my Github repo and set up the webhook I get a 302 error:

POST /github-webhook           302 Found                                                                         
GET  /github-webhook/          405 Method Not Allowed                                                            
POST /github-webhook           302 Found 

I am using this URL for my payload:

http://9xxxxxx9.ngrok.io/github-webhook

I was getting the no bread crumbs error but I turned off CSRF in Jenkins and that seemed to resolve that issue. Any idea how I can fix this?

PruitIgoe
  • 6,166
  • 16
  • 70
  • 137
  • 4
    Of course right after I post this question I find the answer on SO, the internet gods hate me. The answer is to add a trailing / to the webhook url: http://9xxxxxx9.ngrok.io/github-webhook/ – PruitIgoe Oct 15 '19 at 20:53
  • 1
    The original question is here: https://stackoverflow.com/questions/49848884/github-webhook-with-jenkins-return-302-notfound. This can be marked as a duplicate. – PruitIgoe Oct 15 '19 at 20:53
  • Thanks @Pruitlgoe. You are life saver – Arunan Sugunakumar Dec 09 '20 at 04:45

0 Answers0