Could not create work tree dir 'example.com'.: Permission denied

前端 未结 10 618
感动是毒
感动是毒 2020-12-24 05:32

I have got a virtual private server with nginx Virtual Hosts setup (Server Blocks).

I\'ve installed Git and got my ssh keys authenticated with GitHub.

I have

相关标签:
10条回答
  • 2020-12-24 06:02

    You should logged in not as "root" user.

    Or assign permission to your "current_user" to do this by using following command

    sudo chown -R username.www-data /var/www

    sudo chmod -R +rwx /var/www

    0 讨论(0)
  • 2020-12-24 06:03

    I think you don't have your permissions set up correctly for /var/www Change the ownership of the folder.

    sudo chown -R **yourusername** /var/www

    0 讨论(0)
  • 2020-12-24 06:10

    I was facing same issue then I read first few lines of this question and I realised that I was trying to run command at the root directory of my bash profile instead of CD/my work project folder. I switched back to my work folder and able to clone the project successfully

    0 讨论(0)
  • 2020-12-24 06:10

    Change ownership and permissions folder

    sudo chown -R username.www-data /var/www
    
    sudo chmod -R +rwx /var/www
    
    0 讨论(0)
提交回复
热议问题