0

[Screenshot] 1fatal: unable to access '.git/config': Permission denied warning: unable to access '.git/config': Permission denied fatal: unable to access '.git/config': Permission denied warning: unable to access '.git/config': Permission denied fatal: unable to access '.git/config': Permission denied

I'm doing command brew update I have the ZSH shell installed as well and I'm using Iterm also the same error on original terminal

  • Running with sudo? Show the _actual_ commands and _actual_ errors, from the console. – user2864740 Jun 14 '20 at 20:22
  • Mention what you have done, to get this result, and add screenshots and possibly environment details for more clarity on your question. – tHeSiD Jun 14 '20 at 21:16
  • running homebrew as root is not allowed –  Jun 15 '20 at 01:24
  • @tHeSiD how do I get that environment details? –  Jun 15 '20 at 01:33
  • Which command did you execute, where did you execute it, was it with elevated permissions? What is the directory structure? What are you trying to update etc – tHeSiD Jun 15 '20 at 01:36
  • @tHeSiD i was just checking to see if there was any new update on homebrew but i checked the version on github and the one in my system its the latest and everything working fine. i ran brew update and threw that error. –  Jun 25 '20 at 02:46

1 Answers1

2

After your fresh homebrew installation, you should always run sudo chown -R $(whoami) $(brew --prefix)/* to do the one-time permission setup.

This is because homebrew is trying to setup the brew repo for brew in your local.

chenrui
  • 8,910
  • 3
  • 33
  • 43
  • thanks i got it fix but this was the issues anyways my solution at the time was to completely delete homebrew and reinstall –  Nov 07 '20 at 03:34