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

Adding scopes to the GitHub token for gh auth #482

Open
tmcw opened this issue Aug 27, 2024 · 1 comment
Open

Adding scopes to the GitHub token for gh auth #482

tmcw opened this issue Aug 27, 2024 · 1 comment

Comments

@tmcw
Copy link

tmcw commented Aug 27, 2024

Platform or tool

GitHub

Desired or expected behavior

I want to use the Octo neovim plugin, which requires the read:project scope. It recommends I run gh auth refresh -s read:project to add that scope.

Current behavior

I cannot, because that token is being set by op and can't be overridden easily

➜ gh auth refresh -s read:project
The value of the GITHUB_TOKEN environment variable is being used for authentication.
To refresh credentials stored in GitHub CLI, first clear the value from the environment.

Trying to set that token to false in the command doesn't work:

❯ GITHUB_TOKEN="" gh auth refresh -s read:project
The value of the GITHUB_TOKEN environment variable is being used for authentication.
To refresh credentials stored in GitHub CLI, first clear the value from the environment.

I don't know of another workaround. How do I add a scope to the token that op injects into gh?

Relevant log output

No response

op CLI version

2.17.0

@tmcw
Copy link
Author

tmcw commented Aug 27, 2024

Yikes, is that user sharing some exploit? I can't report comments because this isn't my repo, but if it isn't obvious, don't click that link. (I've reported this user and others who appear to be part of the same botnet and are posting the same comment verbatim across repos, as well as reported the link to bit.ly)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant