參考: https://stackoverflow.com/questions/3239274/git-commit-fails-due-to-insufficient-permissionsgit
git add
或者 git commit
以後報錯:error: insufficient permission for adding an object to repository database .git/objects error: insufficient permission for adding an object to repository database .git/objects error: Error building trees
sudo chown -R cygr-0101-01-0133 *
cd .git
sudo chown -R cygr-0101-01-0133 *
https://stackoverflow.com/questions/28832815/git-commands-require-sudo-on-osxshell
其實就是咱們的項目git clone
的時候, 須要系統sudo
權限, 和咱們git安裝與關係. 應該是ssh須要系統權限. 即便操做了, 之後git fetch
和 git push
也須要權限. 但最起碼, 保存不噁心了...ssh
chown -R <user> myproject