git: Unable to index file - permission denied

后端 未结 7 926
粉色の甜心
粉色の甜心 2020-12-29 02:34

Only for one file, I am getting the following error:

error: unable to write sha1 filename /opt/www/.git/objects/3f/ce3587c54a8be14c69b08c6b01f94949b11b47: Pe         


        
7条回答
  •  执念已碎
    2020-12-29 03:12

    You don't have permission to write in /opt/www/.git/objects/3f.

    The quickest solution is to use the sudo command to execute your command with root privileges.

    sudo

    Solved it for me.

提交回复
热议问题