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?
Here's how I solved it:
In Terminal cd
to the User director with cd ~
.
Change the directory permissions with sudo chmod 755 .config
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With