Multiple git repositories with multiple ssh keys
Generating a new SSH key:
user_name@localhost:~$ ssh-keygen -t ed25519 -C "hello@example.com"
Generating public/private ed25519 key pair.
Enter file in which to save the key (/home/user_name/.ssh/id_ed25519):/home/user_name/.ssh/id_ed25519_repo_name
Add it to repository deploy key.
vim ~/.ssh/config:
Host github.com-repo-name
Hostname ssh.github.com
IdentityFile=/home/user_name/.ssh/id_ed25519_repo_name
Port 443
User git
vim .git/config:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = git@github.com-repo-name:github_user_name/repo_name.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
remote = origin
merge = refs/heads/main