Multiple GitHub Accounts on One Mac: Folder-Routed Identity Without SSH Keys
TL;DR. Two GitHub accounts on one machine, routed entirely by which folder a repo lives in. Three problems, three fixes: Problem What it decides Solved by Commit authorship The name and email stamped into the commit includeIf, routed by folder (Layer 1) Push authentication Which account’s credentials talk to GitHub on push Username pinned in the HTTPS remote + gh token (Layer 2) gh CLI account Which account gh pr create and gh repo view act as A shell wrapper that reads the folder (Layer 3) All three route by folder, so nothing depends on remembering to switch accounts. It’s HTTPS with gh-managed tokens throughout and no SSH keys. The steps are below, and the reason for dropping SSH is at the end. ...