Based on article
ssh-keygen -t ed25519 -C "andd3dfx@gmail.com" # use default key name `id_ed25519`
ssh-keygen -t ed25519 -C "Andrei.Punko@another-group.com" # use key name `id_ed25519_another`# Default GitHub account: andrei-punko
Host github.com
HostName github.com
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yes
# Another GitHub account: another
Host github-another
HostName github.com
IdentityFile ~/.ssh/id_ed25519_another
IdentitiesOnly yes
ssh-add ~/.ssh/id_ed25519
ssh-add ~/.ssh/id_ed25519_anotherAccording
to article
to make ssh-add work you may need to run next command before that:
eval `ssh-agent -s`ssh -T git@github.com
ssh -T git@github-anotherIn case of success you will get messages:
Hi andrei-punko! You've successfully authenticated, but GitHub does not provide shell access.
Hi apunko-another! You've successfully authenticated, but GitHub does not provide shell access.
But in clone link you need to use github-another instead of github.com:
- Got from GitHub:
git@github.com:another/sf-original.git - Right link to make clone:
git@github-another:another/sf-original.git
git config user.name "Andrei Punko"
git config user.email "Andrei.Punko@another-group.com"