Skip to content

Confusing error message on scopes #12585

@letmaik

Description

@letmaik
$ gh issue create --project abc

Creating issue in org/repo

? Title (required) test
? Choose a template Open a blank issue
? Body <Received>
? What's next? Submit

X operation failed. To restore: gh issue create --recover /tmp/gh262315914.json

GraphQL: Your token has not been granted the required scopes to execute this query. The 'addProjectV2ItemById' field requires one of the following scopes: ['project'], but your token has only been granted the: ['gist', 'read:org', 'read:project', 'repo', 'workflow'] scopes. Please modify your token's scopes at: https://github.com/settings/tokens.

The link is not helpful, since I don't have any PATs.

Instead, it should behave like this command:

$ gh project list
error: your authentication token is missing required scopes [read:project]
To request it, run:  gh auth refresh -s read:project

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfeedbackgh-issuerelating to the gh issue commandhelp wantedContributions welcomep3Affects a small number of users or is largely cosmetic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions