fix(auth login): use token when logging in
Description
glab auth login
is currently not setting the token from the token prompt. This results in a 401 for every initial login which means no config is set up for a user.
Steps to see the error:
- Delete entry for
gitlab.com
in~/.config/glab-cli/config.yml
glab auth login
>gitlab.com
>Token
- Paste valid token
>ssh
error using api: GET https://gitlab.com/api/v4/user: 401 {message: 401 Unauthorized}
Also occurs for self-managed log ins. This was discovered while debugging #1175 (comment 1385571395)
How has this been tested?
Delete entry for gitlab.com in ~/.config/glab-cli/config.yml
glab auth login
✓ Logged in as jay_mccure
(previously this would return a 401)
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to change) -
Documentation -
Chore (Related to CI or Packaging to platforms) -
Test gap