git insufficient permission for adding an object to repository database ./objects

sudo chmod -R g+ws *
 sudo chgrp -R git *

 git repo-config core.sharedRepository true