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
@eXamadeus GitHub CLI currently has no mechanism for switching between multiple GitHub accounts and I don't really have a workaround to suggest for you at this moment, sorry.
#91
Closed
Smiley23b opened this issue
Dec 12, 2022
· 2 comments
@eXamadeus GitHub CLI currently has no mechanism for switching between multiple GitHub accounts and I don't really have a workaround to suggest for you at this moment, sorry.
The only approach I could imagine, but would not recommend to anyone, would be to authenticate with 1st account, save a copy of ~/.config/gh/hosts.yml somewhere & delete the original file, authenticate again with the 2nd account, and now you can swap the ~/.config/gh/hosts.yml file with the backup file when you need to switch accounts.
Since this solution involves using SSH for git protocol, make sure both configuration files include the git_protocol: ssh line.
The only approach I could imagine, but would not recommend to anyone, would be to authenticate with 1st account, save a copy of
~/.config/gh/hosts.yml
somewhere & delete the original file, authenticate again with the 2nd account, and now you can swap the~/.config/gh/hosts.yml
file with the backup file when you need to switch accounts.Since this solution involves using SSH for git protocol, make sure both configuration files include the
git_protocol: ssh
line.Originally posted by @mislav in cli/cli#326 (comment)
The text was updated successfully, but these errors were encountered: