Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.config/git/ignore': Permission denied

Tags:

git

I am trying to push an app to Heroku using the CLI. When I enter the command git add . in the terminal, I keep getting this error:

/Users/me/.config/git/ignore': Permission denied
'/Users/me/.config/git/attributes': Permission denied

Can anyone help?

like image 631
denskiz Avatar asked Jun 29 '17 01:06

denskiz


2 Answers

Here's how I solved it:

  1. In Terminal cd to the User director with cd ~.

  2. Change the directory permissions with sudo chmod 755 .config

  3. Enter your login password.
like image 120
MeltingDog Avatar answered Sep 29 '22 03:09

MeltingDog


use this command to solve this problem ( commit to git ):

sudo chown -R hamid /Users/hamid

after that enter your Mac login password and allow that's dialogs appear

take attention that hamid is my username and you should enter your username instead of that . You can use the below command to get your username:

id -un
like image 37
Hamid Reza Ansari Avatar answered Sep 29 '22 03:09

Hamid Reza Ansari