Windows10下搭建Git链接远程仓库报错$ ssh -T [email protected] [email protected]: Permission denied (publickey).
$ ssh -T [email protected]
[email protected]: Permission denied (publickey).
先添加用户名和邮件(这一步我是通过eclipse完成)
1、git config --global user.name "usernme"
2、git config --global user.email "emailName"
运行git-bash.exe程序,先创建RSA**对命令:ssh-****** -t rsa(我使用自己命名的方式给文件命名,到时候还是要改)
文件会生成在当前用户下,还会创建.ssh文件夹
然后问题来了?
$ ssh -T [email protected]
[email protected]: Permission denied (publickey).
运行$ ssh -v [email protected]进行debug分析
发现.ssh文件夹下是没有id_dsa和id_rsa.pub文件的,把创建的文件改名为id_dsa和id_rsa.pub(公钥,需要配置的GitHub上去的),再执行ssh -T [email protected]命令,会提示你输入密码
解决