# GitHub Webhook not working

**URL:** <https://forum.ansible.com/t/github-webhook-not-working/37115>\
**Category:** Ansible Project\
**Created:** [September 17, 2022, 9:32pm UTC](https://forum.ansible.com/t/github-webhook-not-working/37115 "2022-09-17T21:32:51Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maik\_Brauer](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@Maik\_Brauer](https://forum.ansible.com/u/Maik_Brauer)\
**Post date:** [September 17, 2022, 9:32pm UTC](https://forum.ansible.com/t/github-webhook-not-working/37115/1 "2022-09-17T21:32:51Z")

</div>

Apart from the standard configuration on a job template to connect everything with webhook service from github, it always turns into 403 Permission denied.  
Anything else to configure?

---

<div class="post-metadata">

**Author:** ![dnmvisser](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dnmvisser](https://forum.ansible.com/u/dnmvisser)\
**Post date:** [September 18, 2022, 4:26am UTC](https://forum.ansible.com/t/github-webhook-not-working/37115/2 "2022-09-18T04:26:11Z")

</div>

I have no idea what this has to do with ansible…

---

<div class="post-metadata">

**Author:** ![Maik\_Brauer](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@Maik\_Brauer](https://forum.ansible.com/u/Maik_Brauer)\
**Post date:** [September 18, 2022, 8:00am UTC](https://forum.ansible.com/t/github-webhook-not-working/37115/3 "2022-09-18T08:00:42Z")

</div>

Because Ansible throws the error, that this request is denied. GitHub sends a webhook to Ansible and ansible denied.  
So I do also not get your statement. Whtnis wrong on my question in asking this as webhook integration is very well know with GitLab and GitHub.

Maik Brauer via [Outlook](https://aka.ms/qtex0l) für iOS

---

<div class="post-metadata">

**Author:** ![m.nelson](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@m.nelson](https://forum.ansible.com/u/m.nelson)\
**Post date:** [September 18, 2022, 12:25pm UTC](https://forum.ansible.com/t/github-webhook-not-working/37115/4 "2022-09-18T12:25:14Z")

</div>

This looks like a question for the AWX team, since you mentioned "job template".

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [September 18, 2022, 12:27pm UTC](https://forum.ansible.com/t/github-webhook-not-working/37115/5 "2022-09-18T12:27:48Z")

</div>

What’s in your step that triggers the awx web hook?

---

<div class="post-metadata">

**Author:** ![Maik\_Brauer](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@Maik\_Brauer](https://forum.ansible.com/u/Maik_Brauer)\
**Post date:** [September 18, 2022, 4:23pm UTC](https://forum.ansible.com/t/github-webhook-not-working/37115/6 "2022-09-18T16:23:27Z")

</div>

I just followed the following guide

[https://docs.ansible.com/ansible-tower/latest/html/userguide/webhooks.html](https://docs.ansible.com/ansible-tower/latest/html/userguide/webhooks.html)

Should be straight forward. But GitHub reports that with an 403 permission denied.

So my question is, do i need to configure something else?

Maik Brauer via [Outlook](https://aka.ms/qtex0l) für iOS

---

<div class="post-metadata">

**Author:** ![Kevin\_Shumaker](https://avatars.discourse-cdn.com/v4/letter/k/eb9ed0/32.png) [@Kevin\_Shumaker](https://forum.ansible.com/u/Kevin_Shumaker)\
**Post date:** [September 18, 2022, 4:56pm UTC](https://forum.ansible.com/t/github-webhook-not-working/37115/7 "2022-09-18T16:56:09Z")

</div>

Out of curiosity, what command is being used to call the github when you get the error?

Can you give a sample / example?  
Does the command work at a command line level?

---

<div class="post-metadata">

**Author:** ![Maik\_Brauer](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@Maik\_Brauer](https://forum.ansible.com/u/Maik_Brauer)\
**Post date:** [September 18, 2022, 6:55pm UTC](https://forum.ansible.com/t/github-webhook-not-working/37115/8 "2022-09-18T18:55:55Z")

</div>

I tried to POST that via POSTMAN. Also there I got a HTTP403 Forbidden.

Due to sensitive data I can’t really post my example here as it contains company data.  
But according to the HowTo guide it should be straight forward.

---

<div class="post-metadata">

**Author:** ![Kevin\_Shumaker](https://avatars.discourse-cdn.com/v4/letter/k/eb9ed0/32.png) [@Kevin\_Shumaker](https://forum.ansible.com/u/Kevin_Shumaker)\
**Post date:** [September 18, 2022, 7:17pm UTC](https://forum.ansible.com/t/github-webhook-not-working/37115/9 "2022-09-18T19:17:43Z")

</div>

You can substitute w.x.y.z for the ip address or name of the web server, and change words or passwords and usernames to something else. It’s hard to diagnose an issue if you don’t know what the format of the command is you are using. I know, from personal experience, that just the number of spaces, quotes, etc are VERY sensitive as to placement.

---

<div class="post-metadata">

**Author:** ![Maik\_Brauer](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@Maik\_Brauer](https://forum.ansible.com/u/Maik_Brauer)\
**Post date:** [September 18, 2022, 7:34pm UTC](https://forum.ansible.com/t/github-webhook-not-working/37115/10 "2022-09-18T19:34:26Z")

</div>

POST for [https://docs.ansible.com/ansible-tower/latest/html/towerapi/api\_ref.html#/Job\_Templates/Job\_Templates\_job\_templates\_github\_create](https://docs.ansible.com/ansible-tower/latest/html/towerapi/api_ref.html#/Job_Templates/Job_Templates_job_templates_github_create)

https://{{my\_url}}/api/v2/job\_templates/33/github/

For HTTP Header I choose:  
Authorization: Bearer {Token from AWX job template }}  
Content-Type: application/json
