我有一台在Ubuntu 12.04服务器上使用Bitnami脚本安装的gitorious服务器。我可以用ssh克隆仓库,不幸的是,当我尝试https URL时,它克隆了一个空的仓库。在网上搜索后,我发现我需要安装mod_xsendfile。我安装使用:如何使用Bitnami Gitorious堆栈通过HTTP克隆git repo?
wget https://tn123.org/mod_xsendfile/mod_xsendfile-0.12.tar.gz#hash(sha256:9078ec28697d672a7f8aa3a19180109c1ccf73dc6aa335e856d1129344566b7e)
tar -xzf mod_xsendfile-0.12.tar.gz
cd mod_xsendfile-0.12/
sudo /opt/gitorious-2.4.12-1/apache2/bin/apxs -cia mod_xsendfile.c
sudo /opt/gitorious-2.4.12-1/ctlscript.sh restart
根据所有的文件,我可以发现,应该是我所需要的。我必须在我的/ etc/hosts文件中为IP添加条目,以便git.gitorious(我选择“gitorious”作为域名)实际映射正确的IP。我在我的服务器和我想要克隆的Ubuntu机器上都这样做了。
不幸的是,http克隆仍在生成空的存储库,直接转到URL也不起作用。我错过了什么?
更新 编辑 /opt/gitorious-2.4.12-1/apps/gitorious/conf/gitorious.conf 并添加行
XSendFile on
XSendFilePath /opt/gitorious-2.4.12-1/apps/gitorious/tarballs
到目录标签:
<Directory "/opt/gitorious-2.4.12-1/apps/gitorious/htdocs/public">
改变了行为,现在而不是空白文件,当我去那个URL我看到消息
OK
The requested URL /dejanney/dejanney.git was not found on this server.
我不知道这是否进展。我已经尝试了XSendFilePath的不同设置,但我似乎无法正常工作。 “/opt/gitorious-2.4.12-1/”不起作用。