2025-03-14 21:59:59 -06:00
|
|
|
# glab auth
|
|
|
|
|
|
|
|
|
|
> Authenticate with a GitLab host.
|
2025-06-28 19:25:29 -06:00
|
|
|
> More information: <https://gitlab.com/gitlab-org/cli/-/blob/main/docs/source/auth/index.md>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Log in with interactive prompt:
|
|
|
|
|
|
|
|
|
|
`glab auth login`
|
|
|
|
|
|
|
|
|
|
- Log in with a token:
|
|
|
|
|
|
2025-06-28 19:25:29 -06:00
|
|
|
`glab auth login {{[-t|--token]}} {{token}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Check authentication status:
|
|
|
|
|
|
|
|
|
|
`glab auth status`
|
|
|
|
|
|
|
|
|
|
- Log in to a specific GitLab instance:
|
|
|
|
|
|
2025-06-28 19:25:29 -06:00
|
|
|
`glab auth login {{[-h|--hostname]}} {{gitlab.example.com}}`
|