当前位置:网站首页>Git SSH bad permissions

Git SSH bad permissions

2020-11-06 22:33:32 Rotco

$ssh -T git@gitee.com
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0550 for 'XXXXXXXXXXXXX/.ssh/id_rsa' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "XXXXXXXXXXXXXX/.ssh/id_rsa": bad permissions
git@gitee.com: Permission denied (publickey).

A clear reason has been output in this step : The key security attribute setting is unreasonable

Solution : Linux: Modify the key pair file attribute to 700/500/400

chmod 700 XXXXXXXXXXXXX/.ssh/id_rsa*

Windows: In the key pair file attribute security option , Change the file control permission to only the owner of the file can control

版权声明
本文为[Rotco]所创,转载请带上原文链接,感谢