拷贝本机的id_rsa文件到服务器执行 git clone
命令的时候出现以下的异常
Permissions 0644 for '/home/admin/.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/admin/.ssh/id_rsa
Enter passphrase for key '/home/admin/.ssh/id_rsa':
Permission denied (publickey).
fatal: Could not read from remote repository.
出现以上的错误,需要将私钥的权限降级到0600,执行以下命令即可。
chmod 0600 id_rsa
参考资料:ssh-keygen 密钥
网友评论