glab-auth
Manage GitLab CLI authentication
TLDR
Login to GitLab
$ glab auth login
Login by piping a token from a file$ glab auth login --stdin < [token.txt]
Login to a self-hosted instance$ glab auth login --hostname [gitlab.example.com]
Show auth status$ glab auth status
Set up git credential helper$ glab auth git-credential
Logout$ glab auth logout
SYNOPSIS
glab auth command [options]
DESCRIPTION
glab auth manages GitLab CLI authentication. It handles logging in to GitLab instances with personal access tokens or OAuth, and stores credentials for use by other glab commands.For self-hosted GitLab instances, use the `--hostname` flag to specify the server address. Credentials are stored in the glab configuration file (`~/.config/glab-cli/config.yml` by default), or in the OS keyring with `--use-keyring`.
PARAMETERS
-h, --hostname host
GitLab host to authenticate with (default: gitlab.com).-t, --token token
An authentication token, provided via prompt, `--stdin`, or `$GITLAB_TOKEN`.--stdin
Read the token from standard input rather than prompting.--api-host host
API host, if different from the web host.--api-protocol http|https
Protocol to use for API requests.--git-protocol http|ssh
Protocol to use for git operations.--use-keyring
Store credentials in the system keyring instead of the plain-text config file.
SUBCOMMANDS
login
Authenticate with a GitLab instance, interactively or non-interactively.logout
Log out of a GitLab instance.status
Show authentication status for known hosts.git-credential
Implement a git-credential-helper for GitLab, usually invoked by git itself.configure-docker
Configure glab as a credential helper for Docker.
INSTALL
sudo apt install glab
sudo dnf install glab
sudo pacman -S glab
sudo apk add glab
sudo zypper install glab
brew install glab
nix profile install nixpkgs#glab
SEE ALSO
glab(1)
