多个 SSH KEY

Host github.com HostName github.com User hotoo IdentityFile ~/.ssh/id\nrsa Host gitlab.example.com HostName gitlab.example.com User user.name@email.address IdentityFile ~/.ssh/id\nrsa\ngitlab\nexample\ncom Host example.com HostName www.example.com User admin Host shterm HostName shterm.example.com User user.name

git config \n\nlocal

git config \n\nlocal user.name username git config \n\nlocal user.email user@email.com

project/.git/config

[user] name = username email = user@email.com

延伸阅读

\n 多个github帐号的SSH key切换 \n Generating SSH Keys \n ssh\nkeygen 中文手册