zl程序教程

您现在的位置是:首页 >  工具

当前栏目

git 生成秘钥

Git 生成 秘钥
2023-09-14 09:12:17 时间
[cpp] view plaincopy
 
  1. Permission denied (publickey).  
  2.   
  3. fatal: The remote end hung up unexpectedly  


应该是ssh key过期了吧

 

试着重新创建ssh key,按以下步骤

 

[cpp] view plaincopy
 
  1. ssh-keygen  


注意短横线前后都没有空格

 

接着一切都默认,它会在把ssh key 储存在

 

[cpp] view plaincopy
 
  1. ~/.ssh/id_rsa.pub  


打开这个文件,把里面的所有的内容都拷贝到你的github网站的ssh key里

 

 

[cpp] view plaincopy
 
  1. gedit ~/.ssh/id_rsa.pub  

在github的右上角edit your profile 里找到ssh key,然后add ssh key,把东西拷贝到key就可以了,title随便填。

 

接着就继续你的push吧