Please optionally split up the "The project you were looking for could not be found" error message for project doesn't exist v.s. user has no access
The error message emitted when the project can't be found OR the user doesn't have access should have an application setting to split it up so that it will say something to the effect of "you don't have read access to this project". See the code that implements this here.
I understand why the default is like that, because if you have private repositories you don't want to leak information. But in in-house setups where the existence of repos isn't secret, this error has caused a lot of confusion with people e.g. thinking they had a typo before finally realizing a deploy key just wasn't provisioned.
The implementation could be something similar to my gitlab-ce!21027, i.e. add a new column / setting for this, and optionally return UnauthorizedError instead of NotFoundError if it's just the can_read_project? condition that doesn't pass.
Example, a repo that actually doesn't exist:
git ls-remote git@gitlab.example.com:imade/thisup.git
GitLab: The project you were looking for could not be found.
fatal: Could not read from remote repository.
And one that does, but I just don't have access to:
git ls-remote git@gitlab.example.com:private/repository.git
GitLab: The project you were looking for could not be found.
fatal: Could not read from remote repository.
For the latter it should be possible to opt-in so you'll get a message like:
GitLab: You don't have permission to access private/repository.git
This also affects the web UI, where the message:
The page could not be found or you don't have permission to view it.
Is shown. That should also be changed by this setting, along with returning a 403 instead of a 404 if the project exists but isn't readable by the user.