auth login - accept additional flags in non-interactive mode
Problem to solve
- As a cli user
- I want to be able to set up my self managed instance with one command
- So that I can easily use glab in CI jobs
Proposal
Currently running glab auth login
in non-interactive mode only accepts hostname
and token
. In many cases this is not enough to set up glab for self-managed instances.
glab auth login
should also accept the following:
api_host
api_protocol
git_protocol
e.g.
glab auth login -h gitlab.my-company.com -t token --api_host gitlab.my-company.com --api_protocol https git_protocol https
Also need to consider the git credential helper (may be a seperate issue)
Links / references
This is where the non-interactive mode ends, so we would need to check for additional flags here: https://gitlab.com/gitlab-org/cli/-/blob/main/commands/auth/login/login.go#L113-113
Edited by Jay McCure