Skip to content

Dynamically select gitlab repo remote in git fetch

What does this merge request do and why?

This MR fixes that the gitlab-org/gitlab> remote name is hard-coded for git fetch during gdk update by using the repository URL from the config.

If the developer is in a network situation where gitlab.com is not accessible over HTTPS but over SSH or another URL, they can change this URL and probably have with gdk install gitlab_repo=....

Partially addresses #2146

How to set up and validate locally

  1. Go to /gitlab
  2. Rename your remote to something other than origin, e.g. git remote rename origin upstream
  3. Run GDK_SELF_UPDATE=0 gdk update
  4. See that it updates the ./gitlab directory

And finally, maybe change your remote name back if you’re used to it being origin.

Impacted categories

The following categories relate to this merge request:

Merge request checklist

  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Tests added for new functionality. If not, please raise an issue to follow-up.
  • Documentation added/updated, if needed.
  • Announcement added, if change is notable.
  • gdk doctor test added, if needed.
  • Add the ~highlight label if this MR should be included in the CHANGELOG.md.
Edited by Kev Kloss

Merge request reports

Loading