5

In jenkins I'm seeing the following error message in the jenkins console while building any of our projects that are integrated with Gitlab.

Failed to update Gitlab commit status for project '120': HTTP 403 Forbidden

Would any of you guys happen to know what can be done to resolve this problem? Or where should I start to check for a solution.

Ronnie Phelps
  • 83
  • 1
  • 11
  • I think the issue is related to the permission. Have you added ssh keys? or user has the access to the repo? Follow this link : https://docs.bitnami.com/1and1/how-to/create-ci-pipeline/ – Twinkle Mar 22 '18 at 05:28

5 Answers5

2

Thanks guys! Your responses helped me to locate my problem. I was able to fix the problem by changing the global configuration for Gitlab credentials.

I went to Jenkins > Manage Jenkins > Configure System

And under Gitlab credentials I added the correct user with valid privileges

Thanks again.

Ronnie Phelps
  • 83
  • 1
  • 11
0

You have a similar error reported in JENKINS-42535.

It includes:

Actually after some testing in another project which does more than just build steps, it seems that we should call the checkout(scm) before doing any gitlab action so that it is configured to the correct repository.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

403 Forbidden

, means your client side requests are forbidden and not authorised for valid responses. Check the SSL keys/ user credentials configuration for accessing Gitlab.
If you are working under a restricted network(which most organisation operates under), use a mirror proxy. Consult the local IT/DevOps team for accessing these resources.

Community
  • 1
  • 1
Manmohan_singh
  • 1,776
  • 3
  • 20
  • 29
0

Forbidden 403

There is a lot of things that can go wrong

Firstly, recheck if the CI/CD trigger is enabled in your repository

General > Visibility, project features, permissions > Repository - CI/CD 

The second thing you need to check is if the user and API access key have a Maintainer role

After those steps hope you will solve your problem

Mykyta
  • 71
  • 3
0

apart from settings in jenkins side (under Configure System > Gitlab), be sure that user has at least Maintainer rights in the repository

YaP
  • 339
  • 3
  • 13