Can't use glab with private/hosted gitlab instances
If I do
glab config --global set gitlab_uri https://git.mycompany.com
, I would expect that all subsequent commands to reference/query my company's internal gitlab instance rather than gitlab.com. If I try to clone a repo:
glab repo clone mycompany/wiki
GET https://gitlab.com/api/v4/user: 401 {message: 401 Unauthorized}
indicating that glab
ignores this setting. Trying again:
export GITLAB_HOST=git.mycompany.com
GET https://git.mycompany.com/api/v4/projects/mycompany/wiki: 404 {message: 404 Project Not Found}
Note that git clone git@git.mycompany.com:mycompany/wiki
works, so I know the endpoint is correct. Looking at the source code, it seems as though glab
is hardcoded to use gitlab.com
. The README says you can use this with self-managed gitlab instances, but from my testing that does not appear to work. Am I doing something wrong, or is this not supported yet?