git Permissions 0777 for '/home/xxx/.ssh/id_rsa' are too open.

使用 git 时出现下面的问题,原因是 git 公钥的权限被修改了。

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for '/home/xxx/.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.
bad permissions: ignore key: /home/xxx/.ssh/id_rsa

重新生成秘钥比较麻烦,可以修改公钥的权限即可:

chmod 600 /home/xxx/.ssh/id_rsa
原文地址:https://www.cnblogs.com/lialong1st/p/9829338.html