关于.ssh出错,无法从远程git仓库拉代码

背景:从windows开发环境改到ubuntu,将windows下生成的.ssh文件拷贝到ubuntu下,以clone远程git仓库代码

 

错误:sign_and_send_pubkey: signing failed: agent refused operation

解决方法:

ssh-agent -s
ssh-add

 

 

错误:Permissions 0664 for '/home/root/.ssh/id_rsa' are too open

解决方法:

sudo chmod 600 id_rsa
sudo chmod 600 id_rsa.pub
sudo chmod 600 known_hosts

 

 

 

posted @ 2019-11-25 16:06  漆天初晓  阅读(421)  评论(0)    收藏  举报