gitlab-plugin icon indicating copy to clipboard operation
gitlab-plugin copied to clipboard

Merge Requests from Forked Repositories cannot be updated due to permissions issues on the fork

Open jsight opened this issue 4 years ago • 3 comments

Issue

The requests to update the merge request are using the source project ID. This is causing the calls to fail with a 403 error when the source repository (often a private fork) has not given permissions to the automation user.

It seems like the project id used for status updates should be the target project ID?

Context

  • Gitlab plugin version: X.Y.Z
  • Gitlab version: 11.6.11
  • Jenkins version: 2.204.2
  • Job type: Pipeline

Logs & Traces

Error: Failed to update Gitlab commit status for project '4633': HTTP 403 Forbidden (where 4633 is the fork)

jsight avatar Apr 03 '20 19:04 jsight

For reference, this part of the code seems to specifically select the source project: OpenMergeRequestPushHookTriggerHandler.java

jsight avatar Apr 03 '20 19:04 jsight

@markyjackson-taulia can give a help? gitlab api token have not permissions to update source repository commit status

caozhiyuan avatar Jun 15 '20 13:06 caozhiyuan

Duplicate of #1151

esoha-nvidia avatar Jan 04 '24 15:01 esoha-nvidia