如何在 http 模式下使用 gitolite

How to using gitolite with http mode

我正在使用 centOS 通过 gitolite 设置我自己的 Git 服务器,我想同时使用 ssh 和 http 模式。
后面跟着'smart-http.root-setup'。

我在执行 git 命令“git clone http://admin:admin@180.163.69.211/git/testing”时遇到问题。

您需要 double-check 您的 httpd.conf 定义为 smart-http.root-setup#L81-L92:

export GITOLITE_HTTP_HOME=$PWD/gitolite-home
...
SetEnv GIT_PROJECT_ROOT $GITOLITE_HTTP_HOME/repositories
ScriptAlias /git/ $GITOLITE_HTTP_HOME/gitolite-source/src/gitolite-shell/

确保 $GITOLITE_HTTP_HOME/repositories/testing.git 确实存在于您的服务器上。

OP S.Yuan reports :

I check the suexec.log in /etc/httpd/logs and the main issue is the file exec auth error.
So I delete the gitolite-suexec-wrapper.sh file. And create it again, then change the file auth.