Skip to content

Add "Custom Git clone URL for HTTP(S)" setting

Michael Kozono requested to merge geo/mk/add-custom-http-clone-url-root into master

What does this MR do?

Allows customization of project HTTP clone URLs. Is more flexible than !18420 (closed) but doesn't take more work to implement. The impetus for this feature is to remove the caveat at:

Unfortunately the means to specify a custom HTTP clone URL is not yet implemented. The feature request can be found at...

There is a risk in this implementation that if we want to constrain the flexibility of this field in the future, it would be difficult since people could put anything in there. If we want to constrain the field now, then it will take more work. E.g. customer fills in customschema://nonsense@foo:bar!baz//quz. We have no reasonable migration path forward from that. I think this "ok" but if anyone can foresee real danger, then we can just go with the other MR with the strict solution (only customize host) and add on to that later as needed (i.e. add a "Custom HTTP clone port" field and a "Custom HTTP clone schema" dropdown).

Closes #31949 (closed)


Added to Admin Area > Settings > General > Visibility and access controls below Enabled Git access protocols:


When set to, the clone panel for a project looks like:



Note: In the gif, since the clone URL is mostly hidden, in order to show the whole URL, I copied and pasted it both times into the browser location bar (I did not hit enter or otherwise attempt to actually navigate to it).


Does this MR meet the acceptance criteria?


Performance and Testing


If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Michael Kozono

Merge request reports