- 第一步:生成ssh公私钥
ssh-keygen -t rsa -C “邮箱”
- 第二步:创建配置文件
# 配置github.com
Host github.com
HostName github.com
IdentityFile C:\Users\chao\.ssh\id_rsa_github
PreferredAuthentications publickey
User 1326330617@qq.com
# 配置gitee.com
Host gitee.com
HostName gitee.com
IdentityFile C:\Users\chao\.ssh\id_rsa_gitee
PreferredAuthentications publickey
User 1326330617@qq.com
# 配置gitlab
Host *.*.*.*
HostName *.*.*.*
IdentityFile C:\Users\chao\.ssh\id_rsa_gitlab
PreferredAuthentications publickey
User yanglichao
- 第三步:将公钥放置到版本仓库
不会去百度
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。