欢迎您访问365答案网,请分享给你的朋友!
生活常识 学习资料

SSH连接GitLab一般会遇到如下问题:

时间:2023-05-17

1 、git添加公钥后报错sign_and_send_pubkey: signing failed: agent refused operation的解决办法 在服务器添加完公钥后报错

sign_and_send_pubkey: signing failed: agent refused operation Permission denied (publickey).

解决办法:这个时候我们只要执行下

eval "$(ssh-agent -s)"

 ssh-add

就可以了

2、解决 id_rsa 权限不够

Permissions 0644 for '/home/robin/.ssh/id_rsa' are too open、 

It is recommended that your private key files are NOT accessible by others、 

This private key will be ignored、 

bad permissions: ignore key: /home/robin/.ssh/id_rsa

解决办法:这个时候我们只要执行下

chmod 755 ~/.ssh/  

chmod 600 ~/.ssh/id_rsa ~/.ssh/id_rsa.pub  

chmod 644 ~/.ssh/known_hosts

Copyright © 2016-2020 www.365daan.com All Rights Reserved. 365答案网 版权所有 备案号:

部分内容来自互联网,版权归原作者所有,如有冒犯请联系我们,我们将在三个工作时内妥善处理。