推送到GitHub时出错 - 没有足够的权限将对象添加到存储库数据库 [英] Error pushing to GitHub - insufficient permission for adding an object to repository database
问题描述
计数对象:在我的GitHub仓库中执行git push 8,完成。
使用2个线程的增量压缩。
压缩对象:100%(4/4),完成。
写作对象:100%(5/5),1.37 KiB,完成。
总计5(增量2),重用0(增量0)
错误:没有足够的权限将对象添加到存储库数据库./objects
致命:未能写入对象
错误:解包对象退出,错误代码为128
错误:解包失败:解包对象异常退出
至git@github.com:bixo / bixo.git
! [远程拒绝] master - > master(n / a(unpacker error))
错误:未能将某些文件推送到'git@github.com:bixo / bixo.git'
$ p
$ ul
上面的存储库是我以前的堆栈溢出问题的有趣来源( SO 1904860 ),所以也许GitHub仓库被损坏了。我通过搜索找到的唯一类似问题是解压缩失败在github上报告的问题。有没有其他人遇到过这个问题,特别是当 not 使用GitHub时?
当你看到这个错误在github以外,这是一种补救措施。
有这个:
http://mapopa.blogspot.com/2009/10/git-insufficient-permission-for-adding.html
ssh me @ myserver
cd存储库/ .git
sudo chmod -R g + ws *
sudo chgrp -R mygroup *
git config core.sharedRepository true
在这之后,git守护进程应该在写入.git / objects时使用组文件权限。
I'm getting back an unusual error while trying to do a "git push" to my GitHub repository:
Counting objects: 8, done. Delta compression using 2 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (5/5), 1.37 KiB, done. Total 5 (delta 2), reused 0 (delta 0) error: insufficient permission for adding an object to repository database ./objects fatal: failed to write object error: unpack-objects exited with error code 128 error: unpack failed: unpack-objects abnormal exit To git@github.com:bixo/bixo.git ! [remote rejected] master -> master (n/a (unpacker error)) error: failed to push some refs to 'git@github.com:bixo/bixo.git'
- After a clean clone from GitHub, I can edit/add/commit/push a modified file.
- If I then repeat this a second time I get the above error.
- I can push to other GitHub repositories just fine.
- I've checked file/directory permissions on my side, and they seem OK.
- I'm running git 1.6.2.3 on Mac OS X 10.5.8
The above repository was the source of my fun for a previous Stack Overflow question (SO 1904860), so maybe the GitHub repo got corrupted. The only similar issue I've found via searching was an unpack failed problem reported on github. Has anybody else run into this issue before, especially when not using GitHub?
When you see this error outside of github, here's a remedy.
Got this from: http://mapopa.blogspot.com/2009/10/git-insufficient-permission-for-adding.html
ssh me@myserver
cd repository/.git
sudo chmod -R g+ws *
sudo chgrp -R mygroup *
git config core.sharedRepository true
After this the git daemon should use the group file permissions when writing to .git/objects.
这篇关于推送到GitHub时出错 - 没有足够的权限将对象添加到存储库数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!