1. 程式人生 > >git管理github提示Permission denied (publickey) git clone出錯

git管理github提示Permission denied (publickey) git clone出錯

需要到github賬號中設定ssh公鑰資訊。

在 GitHub 網站中的"account settings":

"Setting -> SSH Keys"->"New SSH key" 

Title填寫“id_rsa.pub”或其他資訊

在本地:
$  cat ~/.ssh/id_rsa.pub,如果沒有內容,即執行ssh-keygen生成公鑰,一直回車,直到生成id_rsa.pub,然後再cat。
將打印出來的內容拷貝到網站key中,儲存。

在本地:

$  ssh -T [email protected]

確認是否連線成功。