`
radzhang
  • 浏览: 301836 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

git push的出错处理 ! [remote rejected] master -> master (n/a (unpacker error))

    博客分类:
  • git
 
阅读更多

    wiki上修改了markdown文档,commit后异常:

Java代码  收藏代码
  1. Counting objects: 10, done.  
  2. Delta compression using up to 8 threads.  
  3. Compressing objects: 100% (6/6), done.  
  4. Writing objects: 100% (6/6), 1.13 KiB, done.  
  5. Total 6 (delta 4), reused 0 (delta 0)  
  6. error: insufficient permission for adding an object to repository database ./objects  
  7.   
  8. fatal: failed to write object  
  9. error: unpack failed: unpack-objects abnormal exit  
  10. To git@wsgit.com:ws-wiki.git  
  11.  ! [remote rejected] master -> master (n/a (unpacker error))  
  12. error: failed to push some refs to 'git@wsgit.com:ws-wiki.git'  



查出两种这个出现的情况:
1.  权限的问题

Java代码  收藏代码
  1. $ ls -la,查看git库的所有者  

报错如下:
error occurred during unpacking on the remote end: unpack-objects abnormal exit
因为我设置的上传账号是git,但是git库是其他账号git --bare init的,所以就………………
解决:
在git库目录下:


  1. $ chown -vR git *  

 补充还有就是如果目录没有写权限的话push也会报错。

#chmod -R 777 /project.git

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics