-
$ssh-keygen -t rsa -b 4096 -C “your_email@example.com”
-
Enter a file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter]
-
Enter passphrase (empty for no passphrase): [Type a password]
Enter same passphrase again: [Type password again] -
$ open ~/.ssh/config
-
$ cat id_rsa.pub
-
复制全部到github-setting-SSH-generatekey
-
搞定
- 参考:https://docs.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent