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

posted @ 2020-11-03 18:39  DiligentCoder  阅读(85)  评论(0编辑  收藏  举报