Git-更换服务器问题
作者:互联网
一、Permission denied (publickey)
- git指令出现Permission denied (publickey),是ssh key过期的问题,需要对ssh key进行更新,所有设置都选择默认
ssh-keygen
- ssh key公钥将被默认存储在~/.ssh/id_rsa.pub (~/.ssh/id_rsa存储的是私钥)
cat ~/.ssh/id_rsa.pub
- 打开github,右上角打开settings,找到ssh key并将所有内容粘贴即可解决问题
二、Permissions 0744 for ‘/root/.ssh/id_rsa’ are too open处理
- 把权限降到0600就ok了
chmod 0600 ~/.ssh/id_rsa
标签:Git,Permission,rsa,publickey,ssh,key,服务器,更换,id 来源: https://www.cnblogs.com/zhiqinlin/p/16177322.html