Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TokenForHost "authentication token not found" message could be more informative #112

Open
mislav opened this issue Mar 14, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@mislav
Copy link
Contributor

mislav commented Mar 14, 2023

Right now when gh auth token command fails for some reason, TokenForHost masks that with a generic "authentication token not found" error. I propose that the error also includes concrete reasons for the failure if they were known: for example, if gh wasn't found in the PATH.

@tjgurwara99
Copy link

Not sure if this is relevant but I used to be able to get a graphql client without any issues previously but for some reason I now receive an error using the same method that was working before client, err := gh.GQLClient(nil) which returns an err along the lines of authentication token not found for host github.com. Is this to be expected or is there something that I'm missing?

@mislav
Copy link
Contributor Author

mislav commented Apr 12, 2023

We'd need more info to know what's going on there.

  1. Is your extension upgraded to the latest version of go-gh?
  2. Is gh in your PATH and up to date?
  3. Does gh auth status -h github.com work?
  4. Which OS are you on?

Thanks!

@tjgurwara99
Copy link

Ok, so I was on go-gh v1.0.0 and updating to go-gh v1.2.1 fixed the issue on the extension for me - I should have done that before commenting 😅

@samcoe samcoe added the enhancement New feature or request label Apr 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants