ssh-keygen -t ed25519 -C "{你的 email}"- 預設路徑假如已有相同檔案,記得指定新的完整路徑
- 如檔名不用預設的,下面
id_ed25519自行替換成自己的檔名
vi ~/.ssh/config舉例:加上如下
1
2
3
4Host GitHub
HostName github.com
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yes
ssh-add -K ~/.ssh/id_ed25519- register your private key with
ssh-agent
- register your private key with
pbcopy < ~/.ssh/id_ed25519.pub貼到所使用的服務網站的相對應設定頁面