glab on Windows will not authenticate properly
Description I have glab installed under Windows and under Linux (using WSL). WSL works, Windows does not.
Expected Behavior vs Actual Behavior I have literally identical config files between the two script installations.
- Under WSL, everything works fine.
git mr create, as an example, runs and prompts for merge request creation. - Under Windows, all repository-specific commands fail with the error message
"none of the git remotes configured for this repository points to a known GitLab host. Please useglab auth loginto authenticate and configure a new host for glab."
Steps to Reproduce
- Install the latest version of glab under Windows (i used Scoop but i don't think it matters)
- Type
glab auth loginto set up the config file -
cdto a repository directory - Run any repository-specific command such as
glab mr create
Logs
My config file on both environments looks like this (it is literally identical), where <TOKEN> is my actual api token and <USERNAME> is my actual username.
git_protocol: ssh
editor:
browser:
glamour_style: dark
check_update: false
hosts:
gitlab.com:
# What protocol to use to access the api endpoint. Supported values: http, https
api_protocol: https
# Configure host for api endpoint, defaults to the host itself
api_host: gitlab.com
# Your GitLab access token. Get an access token at https://gitlab.com/profile/personal_access_tokens
token: !!null <TOKEN>
git_protocol: ssh
user: <USERNAME>
Your Environment
- Windows 10, glab version glab version 1.16.0 (2021-03-12)
- WSL (Ubuntu 18.04), glab version 1.16.0 (2021-03-12)
Thanks for reporting this issue and detailing out your cases.
Currently I'm having an issue with my windows PC so I'm won't be able to test and reproduce this issue. I need a few clarifications here:
- Do you use custom SSH Configs?
- Run
git remote -vunder windows and see if the host in the config is authenticated forglab
This issue has been automatically marked as stale because it has not had recent activity. We haven't had the time to address it yet, but we want to keep it open. This message is just a reminder for us to help triage issues.