glab auth login could not sign in
Checklist
-
I'm using the latest version of the extension (Run glab --version)- Extension version:
Current glab version: 1.46.0 (2024-09-03)
- Extension version:
-
Operating system and version: macOS Apple M3 -
Gitlab.com or self-managed instance? Gitlab.com -
GitLab version (if self-managed) Nope -
I have performed glab auth statusto check for authentication issues
Summary
Context: I want to add gitlab support for an OSS project I have: https://github.com/Chemaclass/create-pr.sh/issues/23
However, when I try glab auth login with Web and Token, and also choosing as default Git protocol any of them (ssh, https and http) I get the same error:
x Could not sign in! error=error using API: GET https://gitlab.com/api/v4/user: 401 {message: 401 Unauthorized}
Environment
- OS: Darwin 23.6.0 arm64
- SHELL: /bin/zsh
- TERM: xterm-256color
- GLAB: Current glab version: 1.46.0 (2024-09-03)
Other: I am using oh-my-zsh
Steps to reproduce
A demo of me trying login with Web + SSH
Screen_Recording_2024-09-08_at_18.51.47
What is the current bug behavior?
glab auth login
? What GitLab instance do you want to log into? gitlab.com
- Logging into gitlab.com
? How would you like to sign in? Web
? Choose default Git protocol: HTTPS
? Authenticate Git with your GitLab credentials? Yes
- glab config set -h gitlab.com git_protocol https
✓ Configured Git protocol.
- glab config set -h gitlab.com api_protocol https
✓ Configured API protocol.
x Could not sign in! error=error using API: GET https://gitlab.com/api/v4/user: 401 {message: 401 Unauthorized}
What is the expected correct behavior?
I should be able to login successfully somehow.
Relevant logs and/or screenshots
Possible fixes
I don't know.
Edited by Jose.Valera

