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
{{ message }}
Repository navigation
don't drop into browser flow when no auth detected #1511
Currently when gh detects that no host is configured when trying to do an API call it automatically puts the user in a browser-based authentication flow with the goal of returning them to what they were doing upon success.
While it's got us this far and can often feel smooth, it's been a pain point for a variety of users. This issue covers switching to a more explicit approach where, for commands that require authentication, we stop and print helpful instructions for the ways a user can authenticate.
The flow should look something like:
$ gh pr status
Hi! gh is not yet authenticated with any GitHub hosts.
For interactive authentication, please run `gh auth login`. That command will allow you to either log in using
a web browser or paste an existing token.
If you already have a token to use and don't want to store it anywhere, you can set the GITHUB_TOKEN
environment variable.
Activity