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

Error: "Your token has not been granted the required scopes to execute this query" #67

Closed
gr2m opened this issue Jan 28, 2018 · 3 comments

Comments

@gr2m
Copy link
Contributor

gr2m commented Jan 28, 2018

Unfortunately I cannot get it to work with any token, even if I enable all scopes? I always get this error back:

{
  "data": null,
  "errors": [
    {
      "message": "Your token has not been granted the required scopes to execute this query. The 'email' field requires one of the following scopes: ['user:email', 'read:user'], but your token has only been granted the: ['repo'] scopes. Please modify your token's scopes at: https://github.com/settings/tokens.",
      "locations": [
        {
          "line": 9,
          "column": 1
        }
      ]
    }
  ]
}

I tried to debug it but couldn’t figure it out ... any idea what it could be?

The full command I run is

GITHUB_TOKEN=... node src/cli.js -u octokit -r "rest.js" -a 2018-01-17
@RichardLitt
Copy link
Member

I was unable to replicate this. I added all Repo scopes and all User scopes. Did you enable all of those scopes, or just the two needed?

@gr2m
Copy link
Contributor Author

gr2m commented Feb 4, 2018

hmmm it took a while but this time it worked :)

@gr2m gr2m closed this as completed Feb 4, 2018
@RichardLitt
Copy link
Member

RichardLitt commented Feb 4, 2018 via email

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

2 participants