Linux command
glab-auth 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Login to GitLab
glab auth login
Login with token
glab auth login --token [token]
Login to specific host
glab auth login --hostname [gitlab.example.com]
Show auth status
glab auth status
Logout
glab auth logout
说明
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.
参数
- --token _token_
- Authentication token.
- --hostname _host_
- GitLab host.
FAQ
What is the glab-auth command used for?
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.
How do I run a basic glab-auth example?
Run `glab auth login` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --token _token_ do in glab-auth?
Authentication token.