Gitlab-plugin: GitLab Web Hook failed Hook executed successfully but returned HTTP 401

Created on 26 Oct 2018  Â·  4Comments  Â·  Source: jenkinsci/gitlab-plugin

First:
・My Jenkins is working on docker container.
・GitLab is installed in "Redmine Certified by Bitnami" instance of AWS
(use port 80 for Redmine and 8888 for GitLab) .

Issue:
When I try
URL:http://JENKINS_URL/project/PROJECT_NAME on webhook,

I get this massage.

image

・I try also
https://JENKINS_USER_ID:JENKINS_API_TAKEN@JENKINS_URL/project/PROJECT_NAME,
but it did not work.
・Both checked and unchecked the "Enable SSL verification" did not work.

Version:

  • Gitlab plugin version: 1.5.10
  • GitlabCE version: 11.3.0
  • Jenkins version: 2.107.3
  • Job type: Freestyle

Is this error caused by wrong setting of Nginx?
Or related on other network connecting error?

Please give me some advice.

awaiting feedback

Most helpful comment

@asagi687 have you followed the directions at https://github.com/jenkinsci/gitlab-plugin#gitlab-to-jenkins-authentication? Does this user have Job/Build permissions in Jenkins? You can try enabling debug logging by following the directions here: https://github.com/jenkinsci/gitlab-plugin#getting-help and see if that helps show what the issue is.

All 4 comments

@asagi687 have you followed the directions at https://github.com/jenkinsci/gitlab-plugin#gitlab-to-jenkins-authentication? Does this user have Job/Build permissions in Jenkins? You can try enabling debug logging by following the directions here: https://github.com/jenkinsci/gitlab-plugin#getting-help and see if that helps show what the issue is.

Hi @omehegan I tried whatever you suggested but I am also getting the same error. I am running a Ubuntu VM with Jenkins instance in Azure.
Screenshot from 2019-03-29 05-04-36

@asagi687 have you followed the directions at https://github.com/jenkinsci/gitlab-plugin#gitlab-to-jenkins-authentication? Does this user have Job/Build permissions in Jenkins? You can try enabling debug logging by following the directions here: https://github.com/jenkinsci/gitlab-plugin#getting-help and see if that helps show what the issue is.

Thanks for your comment!

this solution served for me
https://github.com/jenkinsci/gitlab-plugin#gitlab-to-jenkins-authentication

Using in webhook:
https://USERID:APITOKEN@JENKINS_URL/project/YOUR_JOB

I got :

Hook executed successfully but returned HTTP 405 <html>
<head><title>405 Not Allowed</title></head>
<body>
<center><h1>405 Not Allowed</h1></center>
<hr><center>nginx/1.16.1</center>
</body>
</html>
Was this page helpful?
0 / 5 - 0 ratings