auth login - check auth in non-interactive mode
Problem to solve
- As a cli user
- I want feedback that when performing
auth login
non-interactively - So that I know that I know I can use glab commands successfully
Proposal
Currently running glab auth login
in non-interactive mode simply writes the hostname
and token
to config.
glab auth login -h gitlab.my-company.com -t token
Note:
-
glab auth login -h gitlab.my-company.com
is interactive. -
glab auth login -t token
will just add a token to gitlab.com's config entry.
Links / references
This is where the command ends when in non-interactive mode, whereas in interactive mode there is a call to check the user login was successful https://gitlab.com/gitlab-org/cli/-/blob/main/commands/auth/login/login.go#L290
Edited by Jay McCure