Git: Fix warning: unable to access ‘/.config/git/ignore’: Permission denied

I just cloned my repository from my github on my local machine and I don’t know why I got this error when trying to see my project changes using “git status”.

warning: unable to access '/Users/my_user/.config/git/ignore': Permission denied
On branch dev
Your branch is up-to-date with 'origin/dev'.
nothing to commit, working directory clean

After I check the folder, I just know that the folder owned by “root” user.

$ ls -lah
drwx------   3 root           staff   102B Aug  1 21:26 .config

I fixed my issue by changing the owner to my user on my laptop.

$ sudo chown my_user .config
Advertisements

4 comments

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s