標籤:
http://www.cnblogs.com/igrl/archive/2010/09/17/1829358.html 1. 安裝git,從程式目錄開啟 "Git Bash" 2. 鍵入命令:ssh-keygen -t rsa -C "[email protected]" "[email protected]"是github帳號3. 提醒你輸入key的名稱,輸入如id_rsa4. 在C:\Documents and Settings\Administrator\下產生兩個檔案:id_rsa和id_rsa.pub5. 把4中產生的密鑰檔案複製到C:\Documents and Settings\Administrator\.ssh\ 目 錄下。6. 用記事本開啟id_rsa.pub檔案,複製內容,在github.com的網站上到ssh密鑰管理頁面,添加新公開金鑰,隨便取個名字,內容粘貼剛 才複製的內容。7. ^_^ OK了 需要注意步驟2中產生的密鑰檔案在目前使用者的根目錄,必須把這兩個檔案放到目前使用者目錄的“.ssh”目錄下才會生效。在windows中只能在命令列下輸入建立"."開頭的檔案夾。命令為 mkdir .ssh
[email protected] xxx~
$ ssh-keygen -t rsa -C "[email protected]"(git帳號)
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/xxxx/.ssh/id_rsa):(儲存地址)
Created directory ‘/c/Users/xxx/.ssh‘.
Enter passphrase (empty for no passphrase):(輸入key的名稱)
Enter same passphrase again:(重複輸入key的名稱)
Passphrases do not match. Try again.(輸入不一致,重複輸入)
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/xxxx/.ssh/id_rsa.(儲存地址)
Your public key has been saved in /c/Users/xxxxx/.ssh/id_rsa.pub.(儲存地址)
The key fingerprint is:
SHA256:xxxx [email protected]
The key‘s randomart image is:
xxxx
windows下如何github ssh 公開金鑰