Customizable Git HTTP clone root URL
Problem to solve
Follow up for #12700 (closed).
Customers can already set the Git clone host for SSH with gitlab_rails['gitlab_ssh_host']. They need to be able to do this for the HTTP clone URL too. Or else in the above issue, they cannot use HTTP, or they must tell users to modify their Git URLs manually, which defeats the purpose, as that over-complicates the user experience.
Intended users
Further details
Proposal
The first setting Enabled Git access protocols already exists in Admin Area > Settings > General > Visibility and access controls. So I am proposing adding the thing below that. (As a text field, not number field though, that's a mistake in the screenshot.)
Using the example clone panel from https://gitlab.com/gitlab-org/omnibus-gitlab/:
The Clone with HTTPS link above is https://gitlab.com/gitlab-org/omnibus-gitlab.git.
If you fill in the new setting as gitlab.rocks.example.com, then that link would change to https://gitlab.rocks.example.com/gitlab-org/omnibus-gitlab.git.
Permissions and Security
Documentation
Tell sysadmins how to use these settings and what they do.
Tell them about these setting where relevant: At least https://docs.gitlab.com/ee/administration/geo/replication/location_aware_git_url.html
Mention something about this caveat:
If
gitlab_rails['gitlab_ssh_host']is set, display a notice on the Settings UI saying the Omnibus setting is in use on this machine, and that it takes priority over "Custom SSH clone root URL" since it is more specific (per machine).


