今天git上传的时候出现了如下错误:
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
原因分析:
ssh key 过期,重新创建即可。
步骤如下:
1.ssh-keygen (注意短横线前后都没有空格)
2.Enter, Enter, Enter...
3.~/.ssh
4.vim id_rsa.pub
5.github页面中,setting->SSH Keys->Add SSH Key
6.title随便起名,然后将id_rsa.pub中的内容copy到key中
PS:Copy your key to your clipboard with: cat ~/.ssh/id_rsa.pub | pbcopy
7.继续push
OK了!
ps:擦...园龄都31了,好好学习啊喂!