Description
I have an issue very similar to OAuth authenitication error #83. I have created a Personal Access Token in GIT, ticking the box for writing gists, and saved this using the line of text - Sys.setenv(GITHUB_PAT = "ghpblahblah") - where "ghpblahblah" was the token generated, which starts with "ghp". I can see in RStudio (Sys.getenv()) that the token is "ghpblahblahblah", as it should be.
However I run the command get("auth_config", envir=gistr:::cache)$auth_token$credentials$access_token, I end up with another token, beginning with "gho" this time, and the error message.
I note that when I run the command gist_auth(), I do not get a new browser tab opening asking me to verify my authentication.
More to the point, when I try to write a new gist
gist_create(public=FALSE, browse=FALSE, filename="test.txt", code="test")
I end up with the following error message:
GitHub response headers suggest no or insufficient scopes
To create gists you need the gist
OAuth scope on your token.
What I am doing wrong?
Session Info
gist_create(public=FALSE, browse=FALSE, filename="test.txt", code="test")