cli / oauth

A library for performing OAuth Device flow and Web application flow in Go client apps.
https://pkg.go.dev/github.com/cli/oauth
MIT License
460 stars 63 forks source link

I have looked in my `$PROFILE` and the system/user Environment variables and I don't see `GITHUB_TOKEN` being set anywhere. #64

Open jebuto opened 3 hours ago

jebuto commented 3 hours ago

I have looked in my $PROFILE and the system/user Environment variables and I don't see GITHUB_TOKEN being set anywhere. But I have no idea how to "first clear the value from the environment". Does anyone know how to cycle out this token that appears to be invalid? Thanks!

Log:


PS C:\Users\anand\src\rust\ruststep> gh auth token
[REDACTED]
PS C:\Users\anand\src\rust\ruststep> gh auth refresh
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.
PS C:\Users\anand\src\rust\ruststep> gh auth logout 
The value of the GITHUB_TOKEN environment variable is being used for authentication.
To erase credentials stored in GitHub CLI, first clear the value from the environment.
PS C:\Users\anand\src\rust\ruststep> gh auth status
github.com
  X github.com: authentication failed
  - The github.com token in GITHUB_TOKEN is no longer valid.
  - ```

_Originally posted by @anandijain in https://github.com/cli/cli/discussions/9647_
jebuto commented 3 hours ago

git@github.com:github/docs.git