Error while pull from git – insufficient permission for adding an object to repository database .git/objects

Assuming @ChrisHayes is right about an accidental sudo, this should fix it. From inside your repository:

sudo chown -R $USER:$USER "$(git rev-parse --show-toplevel)/.git"

Update: for those of you getting the illegal group name error, try this instead:

sudo chown -R $(id -u):$(id -g) "$(git rev-parse --show-toplevel)/.git"

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)