You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for reporting! I can reproduce the same, and even though our GraphQL mutation to create the repository is correct, it seems like the org:read OAuth scope will be necessary for this to work. The GitHub CLI does not currently request this scope when you authenticate, and that is why you are getting this error.
This might be a bug with the GitHub GraphQL API. There are no workarounds that I can suggest to you right now, short of:
Compile gh from source after adding org:read to the list of requested OAuth scopes, then rm ~/.config/gh/config.yml to re-authenticate
Activity
mislav commentedon Mar 12, 2020
Thank you for reporting! I can reproduce the same, and even though our GraphQL mutation to create the repository is correct, it seems like the
org:readOAuth scope will be necessary for this to work. The GitHub CLI does not currently request this scope when you authenticate, and that is why you are getting this error.This might be a bug with the GitHub GraphQL API. There are no workarounds that I can suggest to you right now, short of:
org:readto the list of requested OAuth scopes, thenrm ~/.config/gh/config.ymlto re-authenticatecli/auth/oauth.go
Lines 51 to 52 in d323783
Creating an org repo without a
--teamflag seems to work.wzykubek commentedon Mar 15, 2020
Simmilar issue when I use
gh repo create/ gh repo create --public.output:
I have this issue on my laptop but on PC it works. I reinstalled github-cli and is the same.
OS: Arch Linux
mislav commentedon Mar 16, 2020
@samedamci This looks like a different issue, but you can try re-authenticating by doing
rm ~/.config/gh/config.ymland tryinggh repo createagain.mislav commentedon May 7, 2020
We now ask for an additional
read:orgOAuth scope, which will fixgh repo create --teamin the next release.