首页 > 更新Xcode之后,git commit 出错

更新Xcode之后,git commit 出错

更新Xcode之后,git commit 出错,新手不知道怎么解决了,第一个error貌似很多地方都会出现,看到很多地方都是push的时候才会出现的。

git commit -m "balabala"
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 或者进入文件夹ls -la,查看git库的所有者。然后更改权限:
sudo chown -R git:gitgroup path/to/repo.git/ 其中git是用户名 gitgroup是用户组 path/to/repo.git/ 为路径。可以参考:insufficient permission for adding an object to repository database

【热门文章】
【热门文章】