glab icon indicating copy to clipboard operation
glab copied to clipboard

glab on Windows will not authenticate properly

Open adrienne opened this issue 4 years ago • 2 comments

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 use glab auth login to authenticate and configure a new host for glab."

Steps to Reproduce

  1. Install the latest version of glab under Windows (i used Scoop but i don't think it matters)
  2. Type glab auth login to set up the config file
  3. cd to a repository directory
  4. 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)

adrienne avatar Mar 18 '21 15:03 adrienne

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 -v under windows and see if the host in the config is authenticated for glab

profclems avatar Mar 18 '21 19:03 profclems

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.

clemsbot avatar Apr 22 '21 01:04 clemsbot