git-github 提示Permission denied (publickey) (windows)

这种绝大多数情况是由于公钥设置的问题。

1、生成公钥

  参考地址:https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/

  一般的公钥存放地址:C:Usersadeng.ssh

    id_rsa

    id_rsa.pub

  随便一个文件夹打开Git Bash

  执行:ssh-keygen -t rsa -b 4096 -C "your_email@example.com"    生成密钥对,可以设置密码,需要重复输入,若不设置直接回车

  

2、add ssh key to  the ssh-agent 若你有两个ssh key需要管理则需要这一步,没有的话不需要

3、adding a new ssh key to your github account

  参见地址:https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/

大神指路:Github 之 SSH key的创建于配置(Windows

原文地址:https://www.cnblogs.com/adeng/p/8464170.html