2013-12-10 24 views
7

誰かが次のような解決方法を提案できますか?Homebrew:オブジェクトをリポジトリデータベース.git/objectsに追加する権限がありません

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! 
$ 
+0

一般に、ファイルのアクセス許可は、書き込みを試みるディレクトリのいずれかであることを意味します。 'ls -l'を実行したときに何か間違っていないか確認してください。 –

+0

非常に最初の行では、rm -rf /usr/local/.gitを実行しています。したがって、すべてが2行目のスクラッチから作成されます。私はパーミッションを通過しましたが、問題があれば何も見つかりません。 – MightyMouse

+0

brew updateは、/ usr/local/Library/Taps/* /にあるgitリポジトリを更新することもできます(これは/usr/local/Library/Taps/homebrew-dupes/.gitで行われました)。そこのパーミッションを確認してください。私は醸造掃除がそれをきれいにするかどうか分からない。 –

答えて

10

Dan Rのコメント:

醸造更新も(は/ usr/local /ライブラリ/タップ/ * /で見つかったのgitリポジトリを更新することができ、私はちょうど/これでは、/ usr/local /ライブラリで発生持っていましたTaps/homebrew-dupes/.git)。そこのパーミッションを確認してください。私は醸造掃除がそれをきれいにするかどうか分からない。

私の問題は、私はきれいな醸造の更新を完了し、次のchown後のキャスク

[/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/ 
... 

していました。

[/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 
関連する問題