1、终端输入:ssh-keygen -t rsa -C "xxxxx@xxxxx.com"后,
全部按回车即可。如果出现
/Users/xxx/.ssh/id_rsa already exists.
Overwrite (y/n)? ------ 输入y即可
2、全部按回车后终端出现:
Your identification has been saved in /Users/xxx/.ssh/id_rsa.
Your public key has been saved in /Users/xxx/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:niB...gEiw/LZ...fx2/hBkCK...ZeFCIYaN1Rcg 396955213@qq.com
The key's randomart image is:
+---[RSA 3072]----+
|.B*@*Bo |
...
| |
+----[SHA256]-----+
3、执行:
cat ~/.ssh/id_rsa.pub
4、把第3步内容复制到git个人账号的公钥中