generic-webhook-trigger-plugin icon indicating copy to clipboard operation
generic-webhook-trigger-plugin copied to clipboard

generic webhook trigger didn't work without specifiying token

Open vaibhav65 opened this issue 2 years ago • 5 comments

Used when applying webhook at github without token JENKINS_URL/generic-webhook-trigger/invoke

{"jobs":null,"message":"Did not find any jobs with GenericTrigger configured! If you are using a token, you need to pass it like ...trigger/invoke?token=TOKENHERE. If you are not using a token, you need to authenticate like http://user:passsword@jenkins/generic-webhook... "}

When simply pasting url on chrome it works without token

https://:/generic-webhook-trigger/invoke

vaibhav65 avatar Apr 12 '22 17:04 vaibhav65

version:Jenkins 2.342.So to avoid this error i had to add multiple webhooks at github for multiple repos with multiple tokens

vaibhav65 avatar Apr 12 '22 17:04 vaibhav65

You are probably logged in when using browser. And that is why it works.

tomasbjerre avatar Apr 12 '22 17:04 tomasbjerre

Ok ,But how i can use it in git hub webhook without token JENKINS_URL=https://IP:port JENKINS_URL/generic-webhook-trigger/invoke

vaibhav65 avatar Apr 12 '22 18:04 vaibhav65

Sounds like you want to allow anonymous users to trigger jobs. You need to adjust your security settings.

tomasbjerre avatar Apr 12 '22 18:04 tomasbjerre

Thanks i started using token ..But Occasionally token not found for Generic Webhook Trigger Jenkins Plugin when triggered from webhook.

The difference i found is Automatic inclusion of GitSCM plugin in config.xml when tried to configure job

In build trigger i choose generic webhook trigger but jenkins does take automatically GitSCM and create property in job>config.xml file

</org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty>
2

vaibhav65 avatar Apr 13 '22 10:04 vaibhav65