git 生成公匙私匙

直接 ssh-keygen -t rsa -C "*********@qq.com"也行

git config --global user.name “用户名”

用户名随便起!你能记住就行!

没报错就接着来!

git config --global user.email “邮箱”

没报错就是好消息!

然后执行生成公钥和私钥的命令!

ssh-keygen -t rsa

按回车3下!

为什么按三下?!是因为有提示你是否需要设置密码!如果设置了每次使用Git都会用到密码!一般都是直接不写为空!直接回车就好了!

然后!

执行查看公钥的命令!

cat ~/.ssh/id_rsa.pub  

原文地址:https://www.cnblogs.com/wenxinphp/p/9883480.html