Try to create merge request, got 404 error

I have forked Veilid / developer-book · GitLab into Kyle H / developer-book · GitLab. I have successfully submitted a merge request through the web interface before (the URL was generated by the git push to my work remote, which is Kyle H / developer-book · GitLab); this was accepted.

I changed the branch I was on in my local repo, committed a change, and pushed that to my work repo. It did not give me a merge request link from the push. I navigated to veilid/developer-book, selected Merge Requests (which took me to Merge requests · Veilid / developer-book · GitLab), and clicked “New merge request”. This took me to , which 404’ed.

I also tried to send mail from my gmail account to the “email new merge request to this project”-generated email address. I put the merge request title into the Subject, added context in the body, and attached 0001-Initial-work-on-DHT-concept-page.patch. This did not appear as a merge request in the main repository.

I do not own the repository under the veilid account, but I am certain that the maintainer thereof (@crioux) did not modify its configuration to exclude me from being able to submit another MR, as he likes the fact that I’m writing documentation so that he doesn’t have to.

Describe your question in as much detail as possible:

  • What are you seeing, and how does it differ from what you expect to see?
    A 404 page, instead of a “new merge request” page.

  • Consider including screenshots, error messages, and/or other helpful visuals

  • What version are you on (Hint: /help) ? and are you using self-managed or

GitLab Enterprise Edition 16.5.0-pre cc0f963e6b0

I am using

  • What troubleshooting steps have you already taken? Can you link to any docs or other resources so we know where you have been?

I have detailed what I’ve tried. I don’t have any specific docs or other resources about gitlab merge request troubleshooting.

Notably, I have another fork of a veilid project (veilid/internals-book, to kyanha/internals-book) with an open merge request and no accepted MRs. I can follow its “New merge request” link without a problem (which leads me to kyanha/internals-book/-/merge_requests/new – the same URL format as the one that 404s in the developer-book project), and it takes me to the “select branch” screen with the “compare branches and continue” button.

Thanks for taking the time to be thorough in your request, it really helps! :blush:

The only interesting thing I can think of is that my merge request is on a branch that later merged origin/main into it. But I would expect that to return a 500 on the creation of a new merge request from that branch if it wasn’t handled properly, not a 404 of the “new merge request” URL.

I am, frankly, stumped.

(certain URLs stripped because a new user can only put 10 links in a message – all of them are on the domain.)

Update: I created a new local branch directly off of main, cherry-picked the relevant commit into that new branch, removed the kyanha-concepts-DHT branch both locally and on, and pushed the new local branch to my work remote. The new branch is kyanha-dht-concept. I then attempted to create a new MR in the origin remote. Still got a 404. Sent a new MR email to a newly-generated token email, this time with the content of the .patch file inline. Again, it didn’t open a new MR.

This proves that it was not because of merging origin/main into my MR branch.

I have done everything I can think of. I am verifying with the origin maintainer (when he gets back online) that he did not change the configuration to exclude me from submitting new MRs. I am not touching this any more at the moment, because I’m not sure what I will break if I do.

Your assistance is appreciated!

404 means you do not have permission to do it.

Interesting. (I will still doublecheck with the maintainer, but I’ll assume you’re correct.)

This is an astonishment, though, as it does not follow the W3C HTTP status codes. 404 is “Not Found”. 403 is “Unauthorized”.

Further, I should be able to create MRs to my own fork of the repository, even if I can’t create them to the origin. The fact that I can’t (and thus can’t use the MR process to merge to protected branches in my own fork) is a bit disturbing, and arguably a bug.

Using 404 instead of 401 (unauthorized) or 403 (forbidden) is common practice in other to hide the resource to unauthorized requests instead of confirming it’s existence and providing a resource to attack.

By “you do not have permissions to do it” I meant on your fork. You have did something to your project (fork) settings that prohibits you creating new MR. You have disabled MR completely or you are logged in as wrong user in GitLab (or not logged in at all).

You’re correct. I am slightly concerned, though…

I don’t want merge requests to be submitted to my fork, but I do want to be able to send merge requests upstream. I had thought that disabling merge requests to my fork would have disabled the first, but not the second. Is there a way to do so?

MRs can be opened only by users with Developer role or higher. Unless you give permissions, people cannot open MRs in your projects.