2 ms·
On your git CLI, type 'git remote -v' and you'll see something along the lines of origin git@github.com:<Account Name>/<Repo Name>.git (fetch) and (push) Yo
by Kon-Peki 5y ago
On your git CLI, type 'git remote -v' and you'll see something along the lines of
origin git@github.com:<Account Name>/<Repo Name>.git (fetch) and (push)
You can edit that:
git remote set-url origin <ssh-config-name>:<Account Name>/<Repo Name>.git
In your ssh config file, create the <ssh-config-name> entry with the hostname 'GitHub.com', user 'git', and IdentityFile the location of your ssh key.
You can create an unlimited number of configurations, each with a distinct ssh key. Set the origin url to use that configuration, and every repository can use a different account/key.