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 [email protected] 

  You've successfully authenticated

扫描二维码关注公众号,回复: 1869858 查看本文章

猜你喜欢

转载自www.cnblogs.com/yuzg/p/9264094.html