Git: insufficient permission for adding an object to repository database

后端 未结 2 1671
抹茶落季
抹茶落季 2020-12-10 15:40

I have git error: \"insufficient permission for adding an object to repository database\" every time I make \"git push origin master\".
I tried solution described here:

相关标签:
2条回答
  • 2020-12-10 16:38

    As mentioned in "Error pushing to GitHub - insufficient permission for adding an object to repository database", you need, in addition of the git config setting, to:

    • first set the umask for all your repos: umask 002 (so on your server side)
    • then set the git group to rw as mentioned in your solution, still on the server side.
    0 讨论(0)
  • 2020-12-10 16:39

    That usually happens when someone commited to git while booing root. The .git/* files created in that process are protected from external change.

    chmod -R 777 .git 
    

    is a fast fix.

    0 讨论(0)
提交回复
热议问题