在.ssh新建config:
Default github user([email protected]),注意User项直接填git,不用填在github的用户名
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_github
second user([email protected])
建一个gitlab别名,新建的帐号使用这个别名做克隆和更新
Host 116.63.666.13:8000
HostName 116.63.666.13:8000
User shaohao
IdentityFile ~/.ssh/id_rsa
标签:IdentityFile,git,多用户,github,User,设置,com,ssh From: https://www.cnblogs.com/tenghao/p/17683166.html