【问题标题】:Git failed with a fatal error. error: open permission denied fatal: unable to process pathGit 因致命错误而失败。错误:打开权限被拒绝致命:无法处理路径
【发布时间】:2018-05-11 11:03:49
【问题描述】:

我想提交对表格模型的更改时遇到问题。 我收到以下错误: Git 因致命错误而失败。 错误:打开(“应用程序/源/'texthere'/'texthere'.jfm”):权限被拒绝 致命:无法处理路径Application/Source/'texthere'/'texthere.jfm

我打开了 .gitignore 文件,其中包含 *.jfm 扩展名。

我试图在网上找到一些东西,但没有成功。

【问题讨论】:

  • ls -l Application/Source/'texthere'/'texthere'.jfm ?

标签: git


【解决方案1】:

在此处查看有关此行为的详细信息:https://stackoverflow.com/a/39456723/9776462

要确保 jfm 文件不再由 git 处理,请执行以下操作:

  • 将“*.jfm”添加到 .gitignore
  • 确保 git 尚未跟踪 jfm 文件。如果它已经跟踪,请使用 git rm <jfm-file> 将其删除(您可能必须关闭 Visual Studio 才能使 git rm 工作)
  • 从任何远程分支/存储库中删除文件并重新同步

【讨论】:

    【解决方案2】:

    打开项目时使用*.jfm 文件。因此,卸载项目以提交文件。但是,最好按照 n00ne 的说明从存储库中删除 *.jfm 文件。

    【讨论】:

    • VS2019 中的数据库项目也有同样的问题(无法打开 *.dbmdl 文件,权限被拒绝)-感谢您的解决!
    【解决方案3】:

    创建存储库的裸克隆:

    git clone --bare https://github.com/exampleuser/old-repository.git
    

    镜像推送到新仓库:

    git push --mirror https://github.com/exampleuser/new-repository.git
    

    【讨论】:

      【解决方案4】:
      • 将 *.jfm 行添加到本地 .gitignore 中。
      • 关闭解决方案
      • 从数据库项目中删除 .jfm 文件。
      • 重新打开解决方案并提交。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2018-04-25
        • 2023-02-08
        • 2015-10-08
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-11-29
        相关资源
        最近更新 更多