Log in to multiple GitHub accounts with the CLI
Summary
Introducing support for multiple GitHub accounts on a single host within the CLI! Log in with your work and personal accounts to manage your projects, wherever they're happening. To add…
Introducing support for multiple GitHub accounts on a single host within the CLI! Log in with your work and personal accounts to manage your projects, wherever they're happening.
To add multiple accounts in the CLI, use the gh auth login
command just as before. Now, instead of replacing your previous account, you will see the addition of a new account under gh auth status
. This account will be marked as active
, to indicate that gh
will use it when communicating with GitHub. Run gh auth switch
to change the active account, or gh auth logout
to remove an account. Further details can be found in the v2.40.0
release notes.
Install or update the GitHub CLI today from your preferred source.