-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
bugSomething isn't workingSomething isn't workingmore-info-neededMore info needed from user/contributorMore info needed from user/contributorpriority-3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic
Description
Describe the bug
Using gh 1.0.0 and GitHub Enterprise (GHE) 2.20.12, I could not login with a personal access token until I added the user:email scope.
Only the repo and read:org scopes were listed as required.
Steps to reproduce the behavior
1, Create token with repo and read:org scopes.
- Install
ghfrom Debian repository - Perform login using token
gh auth login --hostname github.company.net - Observe the error
could not validate token: missing required scope 'repo';missing required scope 'read:org' - Add
user:emailscope to existing token. - Re-try login
gh auth login --hostname github.company.net - Observe the error is gone and the login succeeded.
Expected vs actual behavior
The error message should include user:email as a minimum required scope.
Logs
~$ gh auth login --hostname 'github.company.net'
- Logging into github.company.net
? How would you like to authenticate? Paste an authentication token
Tip: you can generate a Personal Access Token here https://github.com/settings/tokens
The minimum required scopes are 'repo' and 'read:org'.
? Paste your authentication token: ****************************************
? Choose default git protocol SSH
- gh config set -h github.company.net git_protocol ssh
✓ Configured git protocol
✓ Logged in as username
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingmore-info-neededMore info needed from user/contributorMore info needed from user/contributorpriority-3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic