配置github和gitee共存的Git环境

配置github和gitee共存的Git环境

  • 转载 -[link](https://blog.csdn.net/qq_42780025/article/details/107129223)
  • 步骤

转载 -link

步骤

cd ~/.ssh

ssh-keygen -t rsa -C "[email protected]" -f "github_id_rsa"
ssh-keygen -t rsa -C "[email protected]" -f "gitee_id_rsa"

#将密钥分别添加到网站上去
vim config
# ~/.ssh 文件下config文件
# gitee

Host gitee.com
HostName gitee.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/gitee_id_rsa

# github

Host github.com
HostName github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/github_id_rsa

#测试
ssh -T [email protected]
ssh -T [email protected]

你可能感兴趣的:(git)