更新 Homebrew 软件 OS X 时的 Git 警告

标签 git macos homebrew

Last login: Mon Mar  7 17:35:51 on console
~ brew update
warning: unable to access '/Users/Jason/.config/git/ignore': Permission denied
warning: unable to access '/Users/Jason/.config/git/attributes': Permission denied
Updated Homebrew from 7f8aa6d to d08692f.
==> New Formulae
cucumber-cpp               prometheus                 znapzend
==> Updated Formulae
afl-fuzz            gtk+                orc                 writerperfect
crystal-lang        kafka               platformio
dependency-check    libvirt             sslscan
ghq                 logtalk             syncthing
~

我在我的 macbook 上运行 El Capitan,每当我尝试更新 Homebrew 软件时,我都会收到这些警告。我正在寻找有关如何阻止这些警告发生的解决方案。

最佳答案

除非确实需要,否则您不应该使用 root 权限运行 brew。运行 brew doctor 并检查 /Users/Jason/.config 的权限:

chown -R Jason:staff ~/.config
chmod -R 744 ~/.config

关于更新 Homebrew 软件 OS X 时的 Git 警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35855617/

相关文章:

Git 分支策略 - pull 请求创建 merge 提交,使分支看起来不同,而文件相同

swift - 给定一个时间戳(字符串),如何在 NSTextView 中找到最接近的时间戳并滚动到它。确切的时间戳可能不存在

python - 在 MacOS Catalina 升级后部署 Google Dataflow 模板时,Protobuf 的数据库错误中已存在文件

没有任何提交历史的 Git merge 功能分支

git - Azure:使用 Visual Studio Team Services 从源代码管理进行部署

git - 如何使github上传的文件chmod=+x?然后使用 wget 命令下载文件并在 github 模式下保留可执行集?

c++ - 遵循 Lynda.com c++ 教程并在 Eclipse (OSX 10.9.3) 上设置路径时遇到问题

swift - 你如何在 Swift 中使用 CGEventTapCreate?

c++ - CMake 错误 : Imported targets not available for Boost version 106300

php - 无法通过 Homebrew 软件 OSX Yosemite 安装 mcrypt