- 檢查是否已經(jīng)有SSH Key
$ ls -al ~/.ssh
2.有的話直接使用命令復制
$ pbcopy < ~/.ssh/id_rsa.pub
沒有就創(chuàng)建(帶""),創(chuàng)建后再使用
ssh-keygen -t rsa -C "郵箱"
不重要的話可不設(shè)置密碼
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/eelly/.ssh/id_rsa):
Created directory '/Users/eelly/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/eelly/.ssh/id_rsa.
Your public key has been saved in /Users/eelly/.ssh/id_rsa.pub.```