致命的:无法在/root/wp-content/cache/page_enhanced/下创建目录 [英] fatal: cannot create directory at /root/wp-content/cache/page_enhanced/ No such a file or directory

查看:83
本文介绍了致命的:无法在/root/wp-content/cache/page_enhanced/下创建目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从服务器中拉出一些更改后.

After some pulling changes from server.

无论我尝试以下哪种方法,我都不能再push:

I can not any more push anything no matter if I try these:

  • git push
  • git pull
  • git merge
  • git rebase origin/master
  • git reset --hard
  • git push or
  • git pull or
  • git merge or
  • git rebase origin/master or
  • git reset --hard

它总是说...

fatal: cannot create directory at /root/wp-content/cache/page_enhanced/.... 
No such a file or directory` 

即使我创建新的干净存储库和clone,它仍然会出现相同的错误.

Even when I create new clean repository and clone, it still gets same error.

我该如何解决?
无论如何,这是一些缓存目录,而我真的不需要它,如何删除或忽略它?

How I can solve this?
Any way this is some cache directory and I don't really need it, how to drop or ignore it?

推荐答案

根据您正在运行的计算机的操作系统和git的版本,可能有几件事.更详细地讲,我可能会更具体.

Could be several things depending on the OS of the machine you are running and version of git. With more detail I could be more specific.

在Windows上,它是目录的权限,或者是目录/路径的长度.在Linux上,将是权限.我还看到了问题所在,原因是目录或文件中不允许使用字符.

On Windows,it's either the permissions of the directories, or it's the length of the directories/paths. On Linux, it would be the permissions. I've also seen cases where the problem is non-allowed characters in directories or files.

删除目录的最佳选择是将其克隆到可以运行的地方,例如运行根目录(或vm或运行cygwin)的linux盒,然后将其添加到.gitignore文件:/wp-content/cache/.

Your best bet to remove the directory is to clone it somewhere that works, like a linux box running root (or a vm or run cygwin), and add this to the .gitignore file: /wp-content/cache/.

然后,要删除已经缓存的信息,请键入: git rm -rf –-cached wp-content/cache然后提交并推送.

Then, to remove the already cached info, type: git rm -rf –-cached wp-content/cache and then commit and push.

这篇关于致命的:无法在/root/wp-content/cache/page_enhanced/下创建目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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