insufficient permission for adding an object - jenhaoyang/backend_blog GitHub Wiki

When git commit gives this error:

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

take back ownership of all Git objects by runnning:

cd <path-to-repo>  
cd .git/objects  
sudo chown -R <username>:<username> *  

參考:
https://www.bravo-kernel.com/2014/08/how-to-fix-git-commit-insufficient-permission-error/

⚠️ **GitHub.com Fallback** ⚠️