Permissions 0777 for xxx are too open

在使用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
[email protected]: 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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章