gpt4 book ai didi

git - Homebrew:将对象添加到存储库数据库 .git/objects 的权限不足

转载 作者:太空狗 更新时间:2023-10-29 12:59:14 25 4
gpt4 key购买 nike

有人可以针对以下问题提出解决方案吗?

必须有一个简单的出路,那就是用 git 运行一些东西。

$ rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1

Press ENTER to continue or any other key to abort
==> Downloading and installing Homebrew...
remote: Counting objects: 142460, done.
remote: Compressing objects: 100% (49574/49574), done.
remote: Total 142460 (delta 97359), reused 136688 (delta 91829)
Receiving objects: 100% (142460/142460), 33.23 MiB | 1.57 MiB/s, done.
Resolving deltas: 100% (97359/97359), done.
From https://github.com/mxcl/homebrew
* [new branch] master -> origin/master
HEAD is now at 8cb0f87 brew-test-bot: fix testing job tag numbering.
==> Installation successful!
You should run `brew doctor' *before* you install anything.
Now type: brew help
$ brew doctor
Warning: Your file-system on / appears to be CaSe SeNsItIvE.
Homebrew is less tested with that - don't worry but please report issues.
$ brew update
error: insufficient permission for adding an object to repository database .git/objects
fatal: failed to write object
fatal: unpack-objects failed
Error: Failed to update tap: homebrew/science
Already up-to-date.
$ brew untap homebrew/science
Error: No such tap!
$

最佳答案

Dan R评论:

brew update can also update git repositories found in /usr/local/Library/Taps/*/ (I just had this happen with /usr/local/Library/Taps/homebrew-dupes/.git ) . Check the permissions there. I'm not sure if brew cleanup cleans that.

我的问题是木桶

[/usr/local/Library/Taps/phinze-cask]
$ brew update
error: insufficient permission for adding an object to repository database .git/objects
fatal: failed to write object
fatal: unpack-objects failed
Error: Failed to update tap: phinze/cask
Already up-to-date.

[/usr/local/Library/Taps/phinze-cask]
$ ls -laF .git/objects | grep root
drwxr-xr-x 3 root admin 102 Dec 2 11:43 05/
drwxr-xr-x 3 root admin 102 Dec 2 11:43 08/
drwxr-xr-x 3 root admin 102 Dec 2 11:43 2f/
...

在以下 chown 之后,我完成了干净的 brew 更新。

[/usr/local/Library/Taps/phinze-cask]
$ sudo chown -Rh ljohnson:admin .git

[/usr/local/Library/Taps/phinze-cask]
$ brew update

Updated Homebrew from 04e337db to 04e337db.
==> New Formulae
phinze/cask/curse-client phinze/cask/plug phinze/cask/undercover
==> Updated Formulae
phinze/cask/armitage phinze/cask/plex-media-server phinze/cask/squirrel phinze/cask/textadept phinze/cask/tunnelbear phinze/cask/vienna-rss
phinze/cask/avidemux phinze/cask/seamonkey phinze/cask/tapaal phinze/cask/totalfinder phinze/cask/twitterrific phinze/cask/vistrails
phinze/cask/fritzing phinze/cask/sqleditor phinze/cask/teamspeak-client phinze/cask/totalspaces phinze/cask/vagrant

关于git - Homebrew:将对象添加到存储库数据库 .git/objects 的权限不足,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20505465/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com