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
I have two Github accounts, one for my work and one for my personal use. I am able to configure Git to use HTTP in certain directories and SSH in others with this .gitconfig:
[init]
defaultBranch = master
[includeIf "gitdir:/Users/myuser/Projects/work/"]
path = /Users/myuser/Projects/work/.gitconfig-work
[includeIf "gitdir:/Users/myuser/Projects/personal/"] # include for all .git projects under personal/
path = /Users/myuser/Projects/personal/.gitconfig-personal
[core]
editor = cursor --wait
I'm also able to log in with the CLI to multiple accounts and switch between them. My question is whether I could do a similar config for the CLI, so I won't need to switch manually between my accounts with gh auth switch?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have two Github accounts, one for my work and one for my personal use. I am able to configure Git to use HTTP in certain directories and SSH in others with this .gitconfig:
I'm also able to log in with the CLI to multiple accounts and switch between them. My question is whether I could do a similar config for the CLI, so I won't need to switch manually between my accounts with
gh auth switch?Thanks for the answers!
Beta Was this translation helpful? Give feedback.
All reactions