It is required that your private key files are NOT accessible by others
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/root/.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 "/root/.ssh/id_rsa": bad permissions
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Solution
权限0644对于文件~/.ssh/id_rsa太开放了。
chmod 600 ~/.ssh/id_rsa ~/.ssh/id_rsa.pub

本文详细解析了SSH私钥文件权限设置不当导致的警告与错误,阐述了如何通过修改文件权限来解决这一问题,确保远程仓库访问的安全。
1393





