Skip to content

Instantly share code, notes, and snippets.

@yermulnik
Last active May 3, 2024 21:08
Show Gist options
  • Save yermulnik/017837c01879ed3c7489cc7cf749ae47 to your computer and use it in GitHub Desktop.
Save yermulnik/017837c01879ed3c7489cc7cf749ae47 to your computer and use it in GitHub Desktop.
GH CLI multi-account switch
git_protocol: ssh
aliases:
personal: '!cp ~/.config/gh/hosts.yml.personal ~/.config/gh/hosts.yml && gh auth status'
work: '!cp ~/.config/gh/hosts.yml.work ~/.config/gh/hosts.yml && gh auth status'
@yermulnik
Copy link
Author

https://github.com/cli/cli/releases/tag/v2.40.0

With the v2.40.0 release, multi-account support is introduced to gh for GitHub.com and GitHub Enterprise and it is only the beginning!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment