致命的:无法在/root/wp

编程入门 行业动态 更新时间:2024-10-24 08:23:43
本文介绍了致命的:无法在/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

本文发布于:2023-11-02 08:12:41,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1551851.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:root   wp

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!