1.1、创建 SHH Key
(1) 设置全局的用户名和邮箱。
$ git config --global user.name "这里填名字" $ git config --global user.email "这里填邮箱" |
(2) 创建SSH Key
ssh-keygen -t rsa -C "walkwithdream@163.com" |
(3) 查看和复制公钥
$ cd ~/.ssh $ ls id_rsa id_rsa.pub |
(4) 在Github或码云上添加SHH Keys
(5) 测试是否配置成功
#测试Github $ ssh -T git@github.com #测试码云 ssh -T git@gitee.com |