输入下面命令行
bash
ssh-keygen
默认回车得到下面的
bash
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/{用户名}/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/{用户名}/.ssh/id_rsa
Your public key has been saved in /Users/{用户名}/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:。。。。。。。。。。。。。。。。。//此处省略
然后输入下面命令行
bash
cat ~/.ssh/id_rsa.pub
得到生成的ssh-ras
然后复制到github或者其他仓库管理平台