在使用wsl 提交代码的时候, 控制台提示这个错误:
$ git push --set-upstream origin master
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for '/home/zyz/.ssh/devwiki' 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/zyz/.ssh/devwiki": bad permissions
git@gitee.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
原因是 ssh key的权限问题, 设置为 700 即可.
chmod 700 devwiki
WSL中SSH权限错误解决
在WSL环境下提交代码时遇到SSH权限错误,详细解析了错误信息并提供了修改SSH密钥权限的方法,只需将权限设置为700即可解决问题。
844

被折叠的 条评论
为什么被折叠?



