Warning: unable to access ... permissions denied

i’m trying to bring my git hub to repository to my local machine.

after entering the following: git clone https://github.com/mgburkett/coursera-test.git

i receive: warning: unable to access ‘/Users/marygraceburkett/.config/git/attributes’: Permission denied

and when i enter: git status

i again receive: warning: unable to access ‘/Users/marygraceburkett/.config/git/attributes’: Permission denied

  • i’m incredibly new to this and cannot find the answer anywhere. please help! and please explain thoroughly! much appreciated!!!

This appears to happen to a lot of people:

offhand, it sounds like something probably assigned ownership of ~/.config to root.

Personally, I’d love for someone to figure out what that something is and get it fixed, since it’s clearly dangerous.

In general, the fix is:

sudo chown -R $USER ~/.config

But, you should really understand what commands do instead of just running them arbitrarily.


(disclaimer: explainshell’s docs are based on Linux, not macOS, but none of these flags differ between the two.)