cli/cli

gh says GITHUB_TOKEN is being used when it's not set

benmoss opened this issue · 1 comments

Describe the bug

I'm trying to create a gist and I get a 401 error because my credentials are expired. It tells me to login, so I try with gh auth login and I get this error:

The value of the GITHUB_TOKEN environment variable is being used for authentication.
To have GitHub CLI store credentials instead, first clear the value from the environment. 

I search for the token it's referring to by running env | grep -i GITHUB_TOKEN and find no results.

gh version 2.48.0 (2024-04-17)
https://github.com/cli/cli/releases/tag/v2.48.0

Steps to reproduce the behavior

I'm not really sure since I don't know what's triggering this behavior

Logs

Not exactly helpful but here's an asciinema of the bug: https://asciinema.org/a/m8uDELj7f43kAflNsHaT6kfya

Ah this is the 1password CLI plugin for gh, I forget how this works but deleting the expired token from my 1password at least sorta fixes it

https://github.com/1Password/shell-plugins/tree/main/plugins/github