git push
或 git pull
时出现错误
Bad owner or permissions on /home/elephantnose/.ssh/config
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
在网上查到因为config
文件权限问题, 按方法执行命令:
chmod 600 config
但 git push 仍有问题, 提示需要键入密码:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0770 for '/home/elephantnose/.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 "/home/elephantnose/.ssh/id_rsa": bad permissions
git@10.100.2.22's password:
仔细看了下警告, 将文件id_rsa
权限修改后问题解决
chmod 666 id_rsa
可以 push
和 pull
了
网友评论