git ssh

1.配置用户名和邮箱
$ git config --global user.name "xxxxxx"
$ git config --global user.email "xxxxxx@163.com"

2.生成密钥对
$ ssh-keygen -t rsa -C "xxxxxx@163.com"
3.添加公钥到远程仓库
查看生成的公钥
$ cat ~/.ssh/id_rsa.pub

原文地址:https://www.cnblogs.com/LoveShare/p/13921826.html