Error: invalid permission for adding an object to repository database

➜  atd git:(b4.232) ✗ git pull
remote: Counting objects: 78, done.
remote: Compressing objects: 100% (77/77), done.
remote: Total 78 (delta 60), reused 0 (delta 0)
error: insufficient permission for adding an object to repository database .git/objects
fatal: failed to write object
fatal: unpack-objects failed

Git error

insufficient permission for adding an object to repository database 

Because the. Git directory of the project has the permission of root,

The solution is to switch to the root super administrator and modify the user of the file as the current computer user

chown -R xxxx: .git

 

Read More: