Git配置多个SSH Key

 

查看已经生成的SSH Key:

cat ~/.ssh/id_rsa.pub

Git配置多个SSH Key

 

生成一个新的ssh key:

ssh-keygen -t rsa -C 'xxx@dingtalk.com' -f ~/.ssh/codeup_id_rsa

Git配置多个SSH Key

 

 同样可以查看新生成的ssh key:

cat ~/.ssh/codeup_id_rsa.pub

 

新建配置config:

touch ~/.ssh/config
# codeup.aliyun.com
Host codeup.aliyun.com
HostName codeup.aliyun.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/codeup_id_rsa

# gitee
Host gitee.com
HostName gitee.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa

 

测试验证:

ssh -T git@gitee.com
ssh -T git@codeup.aliyun.com

 

上一篇:无法定位程序输入点 _glutCreateWindowWithExit于动态链接库glut32.dll上


下一篇:初试Android Studio