HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

glab auth — Authenticate with a GitLab host. More information: <https://gitlab.com/gitlab-org/cli/-/blob/main/do

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandcliwithglab authauthenticategitlabhostmore

Problem

How to use the glab auth command: Authenticate with a GitLab host. More information: <https://gitlab.com/gitlab-org/cli/-/blob/main/docs/source/auth/_index.md>.

Solution

glab auth — Authenticate with a GitLab host. More information: <https://gitlab.com/gitlab-org/cli/-/blob/main/docs/source/auth/_index.md>.

Log in with interactive prompt:
glab auth login


Log in with a token:
glab auth login {{[-t|--token]}} {{token}}


Check authentication status:
glab auth status


Log in to a specific GitLab instance:
glab auth login {{[-h|--hostname]}} {{gitlab.example.com}}

Code Snippets

Log in with interactive prompt

glab auth login

Log in with a token

glab auth login {{[-t|--token]}} {{token}}

Check authentication status

glab auth status

Log in to a specific GitLab instance

glab auth login {{[-h|--hostname]}} {{gitlab.example.com}}

Context

tldr-pages: common/glab auth

Revisions (0)

No revisions yet.