我在我的rapsberry 3上安装了带有gitolite的拱门。 实际上一切都很完美。但是我这样做了 有了这个指示: https://wiki.archlinux.org/index.php/gitolite
所以我想在我的存储库中使用HTTP访问,但它并没有很好地工作。我尝试之后:
git clone http://machine/git/test.git
出现登录提示,但最后我收到以下错误消息:
致命:存储库' http://test:test@machine/git/test.git/'找不到
这是我的包装脚本和我的vhost配置:
#!/usr/bin/bash
#
# suEXEC wrapper for gitolite-shell
#
export GIT_PROJECT_ROOT=/var/lib/gitolite/repositories
export GITOLITE_HTTP_HOME=/var/lib/gitolite
exec /usr/lib/gitolite/gitolite-shell
VHOST
<VirtualHost *:80>
ServerName machine
ServerAlias machine
ServerAdmin server@machine
DocumentRoot /srv/http/git/cgi-bin
SuexecUserGroup gitolite gitolite
ScriptAlias /git /srv/http/git/cgi-bin/gitolite-suexec-wrapper/
<Directory /srv/http/git/cgi-bin>
Require all granted
Options None
AllowOverride none
Order allow,deny
Allow from all
</Directory>
<Location /git>
AuthType Basic
AuthName "Git Access"
AuthBasicProvider file
AuthUserFile /srv/http/git/htpasswd
Require valid-user
</Location>
</VirtualHost>
它可以轻松地在ssh上运行。 感谢您的帮助或任何:)
修改
错误记录
fe80::ba27:ebff:fee8:6d83 - - [29/Apr/2017:01:36:20 +0200] "GET /git/test/info/refs?service=git-upload-pack HTTP/1.1" 401 1214
fe80::ba27:ebff:fee8:6d83 - - [29/Apr/2017:01:36:20 +0200] "GET /git/test/info/refs?service=git-upload-pack HTTP/1.1" 404 969
192.168.178.62 - - [29/Apr/2017:09:41:39 +0200] "GET /git/test.git/info/refs?service=git-upload-pack HTTP/1.1" 401 1218
192.168.178.62 - - [29/Apr/2017:09:41:39 +0200] "GET /git/test.git/info/refs?service=git-upload-pack HTTP/1.1" 404 969
192.168.178.62 - - [29/Apr/2017:09:45:45 +0200] "GET /git/test.git/info/refs?service=git-upload-pack HTTP/1.1" 401 1218
192.168.178.62 - - [29/Apr/2017:09:45:45 +0200] "GET /git/test.git/info/refs?service=git-upload-pack HTTP/1.1" 404 969
192.168.178.62 - - [29/Apr/2017:15:35:54 +0200] "GET /git/test.git/info/refs?service=git-upload-pack HTTP/1.1" 401 1218
192.168.178.62 - - [29/Apr/2017:15:35:54 +0200] "GET /git/test.git/info/refs?service=git-upload-pack HTTP/1.1" 404 969
192.168.178.62 - - [29/Apr/2017:15:36:49 +0200] "GET /git/test.git/info/refs?service=git-upload-pack HTTP/1.1" 401 1218
192.168.178.62 - - [29/Apr/2017:15:36:49 +0200] "GET /git/test.git/info/refs?service=git-upload-pack HTTP/1.1" 404 969
访问日志
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::ba27:ebff:fee8:6d83. Set the 'ServerName' directive globally to suppress this message
[Sat Apr 29 09:41:15.492040 2017] [mpm_event:notice] [pid 1138:tid 1996451408] AH00489: Apache/2.4.25 (Unix) configured -- resuming normal operations
[Sat Apr 29 09:41:15.492273 2017] [core:notice] [pid 1138:tid 1996451408] AH00094: Command line: '/usr/bin/httpd -D FOREGROUND'
[Sat Apr 29 09:44:06.533189 2017] [mpm_event:notice] [pid 1138:tid 1996451408] AH00491: caught SIGTERM, shutting down
[Sat Apr 29 09:45:43.788696 2017] [suexec:notice] [pid 1247:tid 1996410448] AH01232: suEXEC mechanism enabled (wrapper: /usr/bin/suexec)
AH00112: Warning: DocumentRoot [/etc/httpd/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [/etc/httpd/docs/dummy-host2.example.com] does not exist
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::ba27:ebff:fee8:6d83. Set the 'ServerName' directive globally to suppress this message
[Sat Apr 29 09:45:43.829445 2017] [mpm_event:notice] [pid 1247:tid 1996410448] AH00489: Apache/2.4.25 (Unix) configured -- resuming normal operations
[Sat Apr 29 09:45:43.829684 2017] [core:notice] [pid 1247:tid 1996410448] AH00094: Command line: '/usr/bin/httpd -D FOREGROUND'