无法创建工作树目录'example.com':权限被拒绝 [英] Could not create work tree dir 'example.com'.: Permission denied

查看:151
本文介绍了无法创建工作树目录'example.com':权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我已经安装了Git,并获得了使用GitHub进行身份验证的ssh密钥。

我已经安装了一个虚拟专用服务器,其中包含nginx虚拟主机设置(服务器块)。 / p>

我有我的网站在$ / b>

 〜/ var / www / example.com/public_html/ 

我尝试运行:

  git clone git@github.com:example / example.co.uk.git 

将我在GitHub上的文件提取到/ public_html /目录,但出现错误:

  fatal:无法创建工作树dir'example.com':Permission denied 

ve遵循了本教程,其中包括他在页面上提到的相同问题,但它仍然无效: http://machiine.com/2013/pulling-a-git-repo-from-github-to-your-ubuntu-server/



我是全新的对此,您的帮助将非常感谢!

解决方案

我认为您的权限没有正确设置/ var / www
更改文件夹的所有权。


$ b

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


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 my website running in

 ~/var/www/example.com/public_html/

I tried to run:

git clone git@github.com:example/example.co.uk.git

to pull my files on GitHub to the /public_html/ directory but I get the error:

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

I've followed this tutorial including the same issue he has mentioned on the page, but it still won't work: http://machiine.com/2013/pulling-a-git-repo-from-github-to-your-ubuntu-server/

I'm completely new to this, so your help would be much appreciated!

解决方案

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

这篇关于无法创建工作树目录'example.com':权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆