How to check out merge request branch in GitLab coming from fork you don't have access to?

Viewed 190

I'm trying to learn about merge requests and in particular how those work in GitLab.

Given a project MAIN by user USER_MAIN (role: Maintainer) another user USER_OTHER has been invited to join (role: Developer). USER_OTHER creates a fork FORK of MAIN. The repository FORK belongs to USER_OTHER and USER_MAIN has no access to it.

USER_OTHER commits changes to a specific branch in FORK and makes a merge request. Now USER_MAIN needs to see if the changes are correct.

And here is where I'm stuck. In the Merge request section of MAIN I get this:

Merge request in GitLab

I would like to checkout the branch locally. For that I clicked on Check out branch and got this:

Check out branch in merge request

I tried fetching it but I get

remote: The project you were looking for could not be found or you don't have permission to view it. fatal: repository 'https://XXXX/USER_OTHER/FORK.git' not found

And indeed since I'm not a member of FORK I cannot even see the repository.

How would I deal with this? I know that merge requests are not actually part of git but were rather introduced at a later stage (I think by GitHub) so I'm thinking perhaps I can complete the merge request only via the Web UI (or perhaps the GitLab API, which I don't want to deal with right now).

1 Answers

You might need to contact your external contributor, and request access to their fork.

That would allow you to complete the recommended GitLab steps.

Related