wiki上修改了markdown文档,commit后异常:
- Counting objects: 10, done.
- Delta compression using up to 8 threads.
- Compressing objects: 100% (6/6), done.
- Writing objects: 100% (6/6), 1.13 KiB, done.
- Total 6 (delta 4), reused 0 (delta 0)
- error: insufficient permission for adding an object to repository database ./objects
- fatal: failed to write object
- error: unpack failed: unpack-objects abnormal exit
- To git@wsgit.com:ws-wiki.git
- ! [remote rejected] master -> master (n/a (unpacker error))
- error: failed to push some refs to '[email protected]:ws-wiki.git'
查出两种这个出现的情况:
1. 权限的问题
- $ ls -la,查看git库的所有者
报错如下:
error occurred during unpacking on the remote end: unpack-objects abnormal exit
因为我设置的上传账号是git,但是git库是其他账号git --bare init的,所以就………………
解决:
在git库目录下:
- $ chown -vR git *
补充还有就是如果目录没有写权限的话push也会报错。
#chmod -R 777 /project.git