1:桌面右擊后出現Git push here點擊進入直接輸入以下命令
①:ssh-keygen -t ed25519 -f my_github_ed25519 -C "xxxxx"
回車:
-o : 使用新的OpenSSH格式來存儲私鑰,當使用ed25519格式時,默認會啟用此選項
-t : 創建的key的類型,我們使用ed25519
-f : 生成的文件名(my_github_ed25519)
-C : 可選注釋,通常寫自己的郵箱
Generating public/private ed25519 key pair.
Enter passphrase (empty for no passphrase):(密碼,如果想使用時不輸密碼,留空即可)
Enter same passphrase again:(再次確認密碼,留空的還是直接回車)
Your identification has been saved in my_github_ed25519
Your public key has been saved in my_github_ed25519.pub
The key fingerprint is:
SHA256:/iGiXGs7lt03pg/**************************
The key's randomart image is:
+--[ED25519 256]--+
| |
| |
| E |
| . oo |
| S . + +o .|
| . B + o.|
| ooo.* X o .|
| . o=o.*oX=B o |
| oooo o&%*.. .|
+----[SHA256]-----+
一直回車就行!!!!
密鑰生成在C盤用戶中的.ssh文件夾下
可以進入查看或者直接在終端查看
1:cd ~/.ssh 進入 .ssh 目錄
ls:找到 .pub 文件
cat my_github_ed25519.pub:查看公鑰
2:或者你也可以直接輸入命令 :cat ~/.ssh/.pub