git配置金鑰(私鑰、ssh、公鑰)
阿新 • • 發佈:2020-10-16
git配置金鑰(私鑰、ssh、公鑰)
參照:
https://blog.csdn.net/weixin_42063071/article/details/80999690
經常幫人配置git的私鑰,來總結一下簡單的流程真心希望對大家有所幫助。
1.本地安裝好git;
2.桌面右鍵 Git Bash Here 開啟git命令列;
3.ssh-keygen -t rsa -C “[email protected]” (全部按enter);
4.cd ~/.ssh (如果沒有執行第三步,則不會有這個資料夾);
5.cat id_rsa.pub 在命令列開啟這個檔案,會直接輸出金鑰;
6.複製,開啟github ,點自己頭像 >> settings >> SSH and GPG keys >>New SSH key
- titile 隨便寫。 key裡 貼上第六步的內容;完成。
下面是 步驟圖
三、
四、
五、
六、
六、
七、
八、
九、