windows下如何github ssh 公開金鑰

來源:互聯網
上載者:User

標籤:

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 公開金鑰

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.