2022-02-05 19:35:14 +07:00
|
|
|
# glab auth
|
|
|
|
|
2023-07-16 19:23:40 +02:00
|
|
|
> Authenticate with a GitLab host.
|
2025-05-11 20:03:01 +03:00
|
|
|
> More information: <https://gitlab.com/gitlab-org/cli/-/blob/main/docs/source/auth/index.md>.
|
2022-02-05 19:35:14 +07:00
|
|
|
|
|
|
|
- Log in with interactive prompt:
|
|
|
|
|
|
|
|
`glab auth login`
|
|
|
|
|
|
|
|
- Log in with a token:
|
|
|
|
|
2025-05-11 20:03:01 +03:00
|
|
|
`glab auth login {{[-t|--token]}} {{token}}`
|
2022-02-05 19:35:14 +07:00
|
|
|
|
|
|
|
- Check authentication status:
|
|
|
|
|
|
|
|
`glab auth status`
|
|
|
|
|
|
|
|
- Log in to a specific GitLab instance:
|
|
|
|
|
2025-05-11 20:03:01 +03:00
|
|
|
`glab auth login {{[-h|--hostname]}} {{gitlab.example.com}}`
|