id_rsa.pub
里的内容粘贴进去
~/.ssh/config
在 ~/.ssh/config
里指定不同主机用哪个私钥,例如:
# GitLab
Host gitlab.com
HostName gitlab.com
User git
IdentityFile ~/.ssh/id_rsa_gitlab
# GitHub
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_github
# 公司 GitLab 内网
Host git.company.com
HostName git.company.com
User git
IdentityFile ~/.ssh/id_rsa_company
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。