I am getting the following error while trying to commit to a local repository:
error: insufficient permission for adding an object to repository database .git/objects
I created another repository to compare the permissions of .git
and .git/objects
and everything works fine in the new repository, and the permissions are the same drwxr-xr-x
.
What might be causing this error?
cd <path-to-repo>
cd .git/objects
sudo chown -R <username>:<group> *
This worked for me with group staff
.
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