git生成ssh密钥

cd .ssh

如果有这个文件 id_rsa.pub  就证明生成过


github的SSH配置如下:

一 、

设置Git的user name和email:

$ git config --global user.name "xuhaiyan"
$ git config --global user.email "[email protected]"

二、生成SSH密钥过程:
1.查看是否已经有了ssh密钥:cd ~/.ssh
如果没有密钥则不会有此文件夹,有则备份删除
2.生存密钥:

$ ssh-keygen -t rsa -C “email@email.com”
按3个回车,密码为空。

email@email.com是github的账号,即上面的email


tail is_rsa.pub (查看密钥)



猜你喜欢

转载自blog.csdn.net/qq_20729891/article/details/79554000