Git permission denied(public key) 解决方法

1. 在Linux上:

  # ssh-keygen       ##一定用 id_rsa.pub

  # cat /root/.ssh/id_rsa.pub

2. copy 整个文件内容到剪切板

3. 打开IE登录github, 选择 Your profile

     

4.  选择  Edit Profile  ->  SSH and GPG keys  -> new SSH Key ->  Ctrl+v   将剪切板的内容粘贴进去

5. 保存

6. 回到Linux:

  # ssh -T git@github.com 

  You've successfully authenticated

 

posted @ 2018-07-04 16:53  雅槐  阅读(1810)  评论(0编辑  收藏  举报