最近,当我在 Mac 上(使用 Powerline)的 iTerm 中启动 Tmux 时,出现错误git: Permission denied
。当我在 Vim(也使用 Powerline)中输入时,也会反复出现该错误。正如您所看到的,所有这些主题似乎都是 Powerline。我卸载并重新安装了 Powerline,但仍然出现错误。
在我说“算了,我不再使用 Powerline 了”之前,我想知道是否有办法追踪错误以准确找出在不允许的目录/文件上调用 Git 的原因?
PS 我也已经使用磁盘实用程序修复了我系统上的权限。
编辑:我已经完全卸载了 Powerline,但仍然遇到同样的问题。当我启动 Tmux(或在 Tmux 中打开新窗格)或在 Vim 中保存文件时,我收到上述错误。
编辑2:这是我打开终端并运行时看到的内容dmesg
git: Permission denied
git: Permission denied
~/Projects › sudo dmesg | tail -n 20
Password:
smb1_smb_negotiate: Support for the server XRX9C934E142236 has been deprecated (PreXP), disconnecting
smb1_smb_negotiate: Support for the server XRX9C934E142236 has been deprecated (PreXP), disconnecting
smb1_smb_negotiate: Support for the server XRX9C934E142236 has been deprecated (PreXP), disconnecting
fsevents: watcher dbfseventsd (pid: 10879) - Using /dev/fsevents directly is unsupported. Migrate to FSEventsFramework
smb1_smb_negotiate: Support for the server XRX9C934E142236 has been deprecated (PreXP), disconnecting
smb1_smb_negotiate: Support for the server XRX9C934E142236 has been deprecated (PreXP), disconnecting
smb1_smb_negotiate: Support for the server XRX9C934E142236 has been deprecated (PreXP), disconnecting
smb1_smb_negotiate: Support for the server XRX9C934E142236 has been deprecated (PreXP), disconnecting
smb1_smb_negotiate: Support for the server XRX9C934E142236 has been deprecated (PreXP), disconnecting
SerialATAPI device reconfiguration did not complete successfully. (failedCommandInfo = 0x1)
smb1_smb_negotiate: Support for the server XRX9C934E142236 has been deprecated (PreXP), disconnecting
smb1_smb_negotiate: Support for the server XRX9C934E142236 has been deprecated (PreXP), disconnecting
smb1_smb_negotiate: Support for the server XRX9C934E142236 has been deprecated (PreXP), disconnecting
smb1_smb_negotiate: Support for the server XRX9C934E142236 has been deprecated (PreXP), disconnecting
smb1_smb_negotiate: Support for the server XRX9C934E142236 has been deprecated (PreXP), disconnecting
smb1_smb_negotiate: Support for the server XRX9C934E142236 has been deprecated (PreXP), disconnecting
0 [Level 5] [Facility messagetracer] [com.apple.message.domain com.apple.kernel.cs.mismatch] [com.apple.message.signature 1000] [com.apple.message.signature2 53a18aae61685cc356b171ce37cc504048ed45a1] [com.apple.message.signature3 b928c695e1e1a867d5fc392eb8f09e460f3139af] [com.apple.message.summarize YES]
0 [Level 5] [Facility messagetracer] [com.apple.message.domain com.apple.kernel.cs.invalidate] [com.apple.message.signature invalidate] [com.apple.message.signature4 27386] [com.apple.message.signature3 GoogleSoftwareUp] [com.apple.message.summarize YES]
CODE SIGNING: cs_invalid_page(0x1000): p=27386[GoogleSoftwareUp] final status 0x0, allow (remove VALID)ing page
smb1_smb_negotiate: Support for the server XRX9C934E142236 has been deprecated (PreXP), disconnecting
答案1
我最终发现问题出在系统安装的 Git 上。当我使用 Homebrew 安装 Git 并用 Homebrew Git 覆盖系统 Git 时,我不再收到错误。