windows - 在 Windows 上使用 git 时出现警告和 fatal error ?

标签 windows git access-denied

当我想获取当前状态或使用任何 git 命令时,我会看到这两行错误:

warning: unable to access 'C:/Program Files (x86)/Git': Permissio
fatal: cannot use C:/Program Files (x86)/Git as an exclude file

问题出在哪里?
提前致谢!

最佳答案

使用存在的排除文件

如@iltempo 的评论所示 - 发生此错误是因为存在读取文件 C:/Program Files (x86)/Git 的引用,该文件不是文件或不存在.

A global git ignore file是个好主意 - 创建一个之后(如果你还没有) - 更新 git 使用的位置以便它被使用:

git config --global core.excludesfile C:/Users/me/global.gitignore

或者只是删除错误,删除引用:

git config --global --unset core.excludesfile

关于windows - 在 Windows 上使用 git 时出现警告和 fatal error ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14296983/

相关文章:

c++ - 使用 C/C++ 在 Windows 中打印 HTML 文档?

windows - 删除目录中的所有文件和文件夹

c# - 为单个应用程序禁用凭据管理器

git - 如何让 git add -p 接受击键而不等我按 Enter 键?

git - 为什么 git merge 有时会删除不应该更改的更改?

git - 如何 merge 或插入某些提交到其他分支?

amazon-web-services - AWS S3 - 能够从本地上传文件但不能从部署(拒绝访问)

windows - 有什么办法可以得到 future 点的 UTC 时间转换?

c# - 尝试删除文件时访问被拒绝

inno-setup - Inno Setup 安装 - 访问被拒绝