I tried with the trailing slash, and still got a 404 error.
I think your blog post is missing details of how to configure the
*github-webhook* URL.
I think this is configured via this plugin:
https://github.com/jenkinsci/github-plugin/

--
Craig


On Sun, Nov 10, 2019 at 2:34 PM Michael Neale <mne...@cloudbees.com> wrote:

> Hi Craig - I think that you need the trailing slash (as per the blog - I
> seem to recall it was very fickle about that, probably stapler!)
>
> On Sat, Nov 9, 2019 at 7:06 AM Craig Rodrigues <rodr...@crodrigues.org>
> wrote:
>
>> Michael,
>>
>> It looks like the smee client has a *--target* option to specify where
>> to send notifications to:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *Usage: smee [options]Options:  -v, --version          output the version
>> number  -u, --url <url>        URL of the webhook proxy service. Default:
>> https://smee.io/new <https://smee.io/new>  -t, --target <target>  Full URL
>> (including protocol and path) of the target service the events will
>> forwarded to. Default: http://127.0.0.1:PORT/PATH  -p, --port <n>
>> Local HTTP server port (default: 3000)  -P, --path <path>      URL path to
>> post proxied requests to` (default: "/")  -h, --help             output
>> usage information*
>>
>>
>> I followed the steps at
>> https://jenkins.io/blog/2019/01/07/webhook-firewalls/
>> and set up a smee endpoint, then I started the smee client with:
>>
>>
>>
>> *./node_modules/smee-client/bin/smee.js  -u
>> https://smee.io/mysmeeendpoint <https://smee.io/mysmeeendpoint> -t
>> https://jenkins.example.com/github-webhook
>> <https://jenkins.example.com/github-webhook>Forwarding
>> https://smee.io/mysmeeendpoint <https://smee.io/mysmeeendpoint> to
>> https://jenkins.example.com/github-webhook
>> <https://jenkins.example.com/github-webhook>Connected
>> https://smee.io/mysmeeendpoint <https://smee.io/mysmeeendpoint> *
>>
>> I then did a push to my repository in github.  However, the smee client
>> showed an error:
>>
>>
>> *error: Error: cannot POST /github-webhook (404)        at
>> Response.toError (/Users/craigrodrigues/smee/*
>> *node_modules/superagent/lib/*
>> *node/response.js:94:15)        at ResponseBase._**setStatusProperties
>> (/Users/craigrodrigues/smee/**node_modules/superagent/lib/*
>> *response-base.js:123:16)        at new Response
>> (/Users/craigrodrigues/smee/**node_modules/superagent/lib/*
>> *node/response.js:41:8)        at Request._emitResponse
>> (/Users/craigrodrigues/smee/**node_modules/superagent/lib/*
>> *node/index.js:752:20)        at IncomingMessage.<anonymous>
>> (/Users/craigrodrigues/smee/**node_modules/superagent/lib/*
>>
>>
>> *node/index.js:916:38)        at IncomingMessage.emit (events.js:208:15)
>>       at endReadableNT (_stream_readable.js:1154:12)        at
>> processTicksAndRejections (internal/process/task_queues.*
>>
>>
>>
>>
>> *js:77:11) {      status: 404,      text: '404 page not found\n',
>> method: 'POST',      path: '/github-webhook'    },*
>>
>> Is there some other setup that is required on the Jenkins server to get
>> this to work?
>> I have a Jenkins LTS 2.190.2 server, with Blue Ocean, Pipeline, and many
>> other plugins installed.
>>
>> --
>> Craig
>>
>>
>
>
> --
> Regards,
>
> Michael Neale
> twitter: @michaelneale, skype: michael_d_neale
> Cell: +61 423175597 (Australia)
> Cofounder @ CloudBees
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAG%3DrPVeNhb0m%2B-vFox4qFYiSwbRiwukdM%3Dm%2BTDj90FkB9LVswg%40mail.gmail.com.

Reply via email to