Error while collecting auth token
Closed this issue · 1 comments
julienvincent commented
I'm trying to use this plugin but am failing to launch it successfully. I am authenticated with Github using the gh
cli.
If I launch Neovim with a GITHUB_TOKEN
env set then it works fine, but I really don't want to do this.
I noticed that the plugin is looking at $HOME/.config/gh/hosts.yml
for auth tokens:
On my system this file does not contain any token information:
❯ cat $HOME/.config/gh/hosts.yml
github.com:
user: julienvincent
git_protocol: ssh
Some additional system status information:
❯ gh version
gh version 2.32.1 (2023-07-24)
https://github.com/cli/cli/releases/tag/v2.32.1
❯ gh auth status
github.com
✓ Logged in to github.com as julienvincent (keyring)
✓ Git operations for github.com configured to use ssh protocol.
✓ Token: gho_************************************
✓ Token scopes: gist, read:org, repo
julienvincent commented
It looks like the gh
cli offers a gh auth token
command which can print out the currently configured token.
I guess this could be used instead of looking into the filesystem. Might give this a stab if I get a few minutes.