连接github Permission denied (publickey).解决

来源:互联网 发布:unity3d麻将开发思路 编辑:程序博客网 时间:2024/05/20 17:20

连接github Permission denied (publickey).解决

本地配置

生成ssh-key
1、ssh-keygen -t rsa -b 4096 -C wlazjr@gmail.comEnter file in which to save the key 2、设置id名称(/Users/hostName/.ssh/id_rsa): id_xxx3、输入密码Enter passphrase (empty for no passphrase): 在这里输入您的密码4、Enter same passphrase again: 再次输入您的密码5、生成秘钥成功提示如下:Your public key has been saved in id_wlazjr.pub.6、将该秘钥加入本地配置:ssh-add -K ./id_wlazjr之后提示输入密码:Enter passphrase for ./id_wlazjr:7、看到成功提示:Identity added: ./id_wlazjr (./id_wlazjr)8、将刚刚生成的秘钥拷贝到系统剪切板  pbcopy < id_wlazjr.pub 9、将刚刚拷贝的秘钥粘贴到sshkey配置中即可:https://github.com/settings/keys10、验证* ssh -T git@github.comHi wlazjr! You've successfully authenticated, but GitHub does not provide shell access.
1 0
原创粉丝点击