每次重新启动虚拟机 Git push 就会 Permission denied (publickey).
重启虚拟机后git push就会报错
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
但是我执行下面三条命令后
$ eval "$(ssh-agent -s)"
$ ssh-add ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub
拷贝公钥,删除github原有密钥,重新上传才行
是不是我的设置出了什么问题,才会这样
关于 LearnKu
你这个不是重新生成 SSH key ,详情请回去仔细看 教程 。具体生成 SSH key 的命令为:
然后他会提示你是否输入密码,这里回车即可。 另外,生成 SSH key 应该实在本机进行,而不是虚拟机。