现在我可以克隆http就好了,但是当我尝试推送时,客户端获得:
$git pushUsername:Password:Counting objects: 4,done.Delta compression using up to 4 threads.Compressing objects: 100% (2/2),done.Writing objects: 100% (3/3),291 bytes,done.Total 3 (delta 0),reused 0 (delta 0)error: unpack Failed: unpack-objects abnormal exit
服务器Apache错误日志说:
error: insufficIEnt permission for adding an object to repository database ./objects
fatal: Failed to write object
Apache配置:
SetEnv GIT_PROJECT_ROOT /opt/gitSetEnv GIT_http_EXPORT_ALLScriptAlias /git/ /usr/libexec/git-core/git-http-backend/<Location /git> AuthType Basic Authname "Private Git Access" Require valID-user AuthUserfile /opt/git/passwords</Location>
显然我的第一个想法是文件权限,所以我做了一个快速的chown -R apache:/ opt / git
# ls -l /opt/gitdrwxr-xr-x. 7 apache apache 4096 Aug 12 11:06 project.git
但我仍然得到同样的错误.
谢谢,非常感谢我能得到的任何帮助.
解决方法 试试跑步:git repo-config core.sharedRepository true
这为我解决了类似的问题.来自文档:
core.sharedRepository
If true,the repository is made shareable between several users in a
group (making sure all the files and objects are group-writable).
你能验证这里给出的步骤(这肯定是权限/组问题):
http://parizek.com/?p=177
总结以上是内存溢出为你收集整理的linux – 没有足够的权限推动通过智能HTTP Git共享回购全部内容,希望文章能够帮你解决linux – 没有足够的权限推动通过智能HTTP Git共享回购所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)