Git:配置多个SSH证书

来自WHY42

为多个不同的git repository配置不同的SSH key:

~/.ssh/config

Host github.com
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_ed25519

Host github.com-xxx
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_rsa

然后需要将repository的地址进行替换:

git remote set-url origin git@github.com-xxx:XXX/XXXX.git