Hrm - I didn't need to do anything like that, no. Unless something has
changed since I tried it, I was using a very stock setup with the github
plugin etc, and it worked fine if I setup the pipeline as a github source
type.

On Thu, Nov 14, 2019 at 9:02 AM Craig Rodrigues <rodr...@crodrigues.org>
wrote:

> Michael,
>
> I tried following your blog post:
> https://jenkins.io/blog/2019/01/07/webhook-firewalls/
>
> I did the following additional steps not in your blog post using a Jenkins
> 2.190.2 server:
>
>
>    1. I configured the smee endpoint, https://smee.io/myendpoint
>    2. I ran the smee client, which just sits there, and waits for
>    notifications on https://smee.io/myendpoint , and then forwards these
>    notifications to http://localhost:8080/github-webhook/
>     using this script:
>
>
>
>
>
>
> *#!/bin/sh URL=https://smee.io/myendpoint <https://smee.io/myendpoint>
>    SMEE=/Users/craigrodrigues/smee/node_modules/smee-client/bin/smee.js
>    TARGET=http://localhost:8080/github-webook/
>    <http://localhost:8080/github-webook/> $SMEE --url $URL  --target $TARGET*
>
>
>    3. I configured a webhook on my GitHub repository to connect to
>    https://smee.io/myendpoint
>    4. I do a git push to my github repo
>    5. GitHub does a POST on https://smee.io/myendpoint
>    6. Smee client forwards that post to
>    http://localhost:8080/github-webhook/
>
>
> On my Jenkins server, I had to configure this:
> [image: image.png]
>
> After doing a *git push*, if I look in the logs of the smee client, I see:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *    status: 403,      text: '<html>\n' +        '<head>\n' +
> '<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>\n' +
>       '<title>Error 403 No valid crumb was included in the
> request</title>\n' +        '</head>\n' +        '<body><h2>HTTP ERROR
> 403</h2>\n' +        '<p>Problem accessing /github-webook/. Reason:\n' +
>     '<pre>    No valid crumb was included in the request</pre></p><hr><a
> href="http://eclipse.org/jetty <http://eclipse.org/jetty>">Powered by
> Jetty:// 9.4.z-SNAPSHOT</a><hr/>\n' +        '\n' +        '</body>\n' +
>     '</html>\n',      method: 'POST',      path: '/github-webook/'    },*
>
>
> So it looks like in order to access http://localhost:8080/github-webhook/
> , I need to pass some sort of authentication
> in order to access that URL.
>
> How did you configure this in your setup?
>
> --
> 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/CAEuC6LhhY_rortpPviqcOU3knYq2x-pC%2Bc-urmH5mi505tguiQ%40mail.gmail.com.

Reply via email to