Skip to main content

Gitlab CLI

glab auth login
glab auth login --hostname gitlab.com
GITLAB_HOST=gitlab.com glab auth login

# --stdin
glab auth login --token GITLAB_TOKEN --hostname gitlab.com

# glab mr list|create|view|checkout|approve [id]
# glab issue list|create|view [id]
# glab ci list|view|retry|trace [branch|id]
# glab repo clone|view|fork [path]
envDescription
GITLAB_HOST, GL_HOST
GITLAB_TOKENPersonal Access Token
EDITOR, VISUALe.g., vim, nano, code --wait
BROWSER
DEBUG详细日志
NO_PROMPT禁用所有交互式提示
GLAB_CONFIG_DIR
  • GLAB_CONFIG_DIR=~/.config/glab-cli`
  • ~/.config/glab-cli/config.yml