Skip to content

glab repo clone using a full URL authenticates to gitlab.com

Checklist

  • I'm using the latest version of the extension (Run glab --version)
  • Gitlab.com or self-managed instance? both
  • I have performed glab auth status to check for authentication issues

Summary

Steps to reproduce

Set an incorrect/empty token for the gitlab.com host entry in ~/.config/glab-cli/config.yml Set host to gitlab.com in ~/.config/glab-cli/config.yml or remove host as it will default to gitlab.com

glab repo clone https://mygitlab.com/mygroup/myrepo

What is the current bug behavior?

GET https://gitlab.com/api/v4/user: 401 {message: 401 Unauthorized}

What is the expected correct behavior?

repo is cloned similar to:

GITLAB_HOST=mygitlab.com glab repo clone https://mygitlab.com/mygroup/myrepo

Workaround

Set host to your desired env in ~/.config/glab-cli/config.yml

Edited by Jay McCure
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information