今天写了一篇博客,想push到github上的时候出现了以下错误
- Permission denied (publickey).
- fatal: The remote end hung up unexpectedly
应该是ssh key过期了吧
试着重新创建ssh key,按以下步骤
- ssh-keygen
注意短横线前后都没有空格
接着一切都默认,它会在把ssh key 储存在
- ~/.ssh/id_rsa.pub
打开这个文件,把里面的所有的内容都拷贝到你的github网站的ssh key里
- gedit ~/.ssh/id_rsa.pub
接着就继续你的push吧