# GitLab webhook trigger using Jenkins integration fails

**URL:** <https://community.jenkins.io/t/gitlab-webhook-trigger-using-jenkins-integration-fails/1220>\
**Category:** Ask a question\
**Tags:** question\
**Created:** [January 11, 2022, 3:04pm UTC](https://community.jenkins.io/t/gitlab-webhook-trigger-using-jenkins-integration-fails/1220 "2022-01-11T15:04:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fsociety3765](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/fsociety3765/32/799_2.png) [@fsociety3765](https://community.jenkins.io/u/fsociety3765)\
**Post date:** [January 11, 2022, 3:04pm UTC](https://community.jenkins.io/t/gitlab-webhook-trigger-using-jenkins-integration-fails/1220/1 "2022-01-11T15:04:44Z")

</div>

Hi all,

I have recently started using Jenkins and I’m getting all my integrations set up. Naturally, I’m facing a few instances where I’m searching docs for answers on how to set things up.

I’m having a similar problem with this closed issue on GitHub.  
[Web hook fails when Jenkins Anonymous user does not have job/build permission](https://github.com/jenkinsci/gitlab-plugin/issues/375)

Currently, I don’t have a username or password specified in the Jenkins integration in GitLab because I couldn’t get it to successfully test the connection when doing so. So, it makes sense that the webhook is being triggered by the “anonymous” user and correctly failing.

I think the reason I could not get the username and password part with the Jenkins integration in GitLab working is related to the fact I have my Jenkins instance authentication setup to use the OAuth of my GitLab instance to protect Jenkins with two-factor authentication, since I am exposing it publicly. The OAuth integration is working perfectly as expected in Jenkins. But when I try to use my GitLab username and password in the webhook integration it fails the test connection.

The issue on GitHub above mentions creating a special “jenkins” user to make the call from GitLab but as I am using GitLab OAuth I can’t seem to find a way to create a basic local user in Jenkins.

I don’t want the webhooks to be unprotected.

Does anyone know of a solution to this scenario?

Any help would be greatly appreciated.

Thanks,

FS

---

<div class="post-metadata">

**Author:** ![fsociety3765](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/fsociety3765/32/799_2.png) [@fsociety3765](https://community.jenkins.io/u/fsociety3765)\
**Post date:** [January 11, 2022, 9:10pm UTC](https://community.jenkins.io/t/gitlab-webhook-trigger-using-jenkins-integration-fails/1220/2 "2022-01-11T21:10:14Z")

</div>

Finally found the solution.

Create an API token for the user in Jenkins and use that as the password in GitLab.
