在使用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
Last modification:May 23rd, 2020 at 04:46 pm
If you think my article is useful to you, please feel free to appreciate