git生成ssh公钥方法--远程连接github仓库

先配置全局的用户名和邮箱

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

生成公钥命令

#1、cd到当前用户加目录下
cd  ~

#2、生成公钥文件
ssh-keygen -t rsa -C 'youremal'


#3、查看你的公钥
cat .ssh/id_rsa.pub

将公钥添加到git设置中

1、

2、

3、

猜你喜欢

转载自www.cnblogs.com/Kingfan1993/p/10295600.html