我正在尝试为我们的团队评估git,其中一个要求是使用HTTPS作为传输方法。我一直试图遵循git-http-backend文档以及一些关于使用新的智能HTTP传输进行设置的稀少博客,但我只是没有得到它的工作。我知道这可能是愚蠢的,但我已经绞尽脑汁,无济于事。不要假设你有任何真正的知识,我对这个工具很陌生。权限不足通过智能HTTP推送Git共享回购
现在我可以克隆通过HTTP就好了,但是当我尝试和推动下,客户端获取:
$ git push
Username:
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/git
SetEnv GIT_HTTP_EXPORT_ALL
ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/
<Location /git>
AuthType Basic
AuthName "Private Git Access"
Require valid-user
AuthUserFile /opt/git/passwords
</Location>
显然,我的第一个念头是文件权限,所以我做了一个快速乔敦 - R的阿帕奇中:/ opt/git的
# ls -l /opt/git
drwxr-xr-x. 7 apache apache 4096 Aug 12 11:06 project.git
但我仍然得到同样的错误。
谢谢,我非常感谢任何帮助,我可以得到这一点。
这最终成为了SELinux阻止来自Apache的写入目录。 – bfos