1. 程式人生 > >Git與Github關聯

Git與Github關聯

原文:http://www.cnblogs.com/tinyphp/p/5025311.html

1.開啟Git Bash,建立SSH Key,

$ ssh-keygen -t rsa -C "user.email"

一路回車可以在當前使用者根目錄/.ssh/下生成兩個檔案

id_rsa是私鑰

id_rsa.pub是公鑰

把公鑰的內容拷貝到剪貼簿

2.登入GitHub,開啟"SSH Keys"頁面,快捷地址:https://github.com/settings/ssh 

 

3.測試是否成功

在gitbash使用命令“ssh -T [email protected]

”,出現下列內容表示成功