Skip to content

fix: utilize api_host in config to avoid git subdomain issues

Description

Self managed GitLab instances within a subdirectory can cause problems with glab and API urls: #1168 (closed)

I have a self-managed gitlab instance (in a docker swarm) in a subdirectory, as in https://my.host.com/git/. Similar to #1046 (closed) (closed) (Can't use glab with private/hosted gitlab instances), it seems that the subdir component is being copied into the API url.

This MR will utilize the api_host entry when parsing URLs if it's available.

Related Issues

Resolves #1168 (closed)

How has this been tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation
  • Chore (Related to CI or Packaging to platforms)
  • Test gap

Closes #1168 (closed)

Edited by Gary Holtz

Merge request reports

Loading