Hello,
I installed version 2.2.1 GERRIT to the server. I created a test
project. Through the web interface (
http://git.yotalab.ru:8081/gerrit)
I allow anonymous read access for this project. Next I ran the command
"git clone" using SSH address project ssh://
dlog...@git.yotalab.ru:29418/test_gerrit
But I could not do the same through an HTTP-address "git clone
http://git.yotalab.ru:8081/test_gerrit" (output: not found /info/refs)
Why? What i do wrong?
WBR, Dmitry Loginov
Here is my configuration:
* gerrit installation folder - /srv/gerrit
* git projects directory - /srv/git
* gerrit.config
===========
[gerrit]
basePath = /srv/git
[database]
type = H2
database = db/ReviewDB
[auth]
type = LDAP
[ldap]
server = ldap://
ldap.domain.ru/
username =
CN=AD_Checker,OU=Services,OU=YotaLab,OU=SPB,DC=ru,DC=yotateam,DC=com
accountBase = OU=YotaLab,OU=SPB,DC=ru,DC=yotateam,DC=com
groupBase = ou=YotaLab
Groups,OU=YotaLab,OU=SPB,DC=ru,DC=yotateam,DC=com
[sendemail]
smtpServer =
mx.domain.ru
[container]
user = git_superuser
javaHome = /usr/java/default/jre
[sshd]
listenAddress = *:29418
[httpd]
listenUrl = proxy-http://*:8081/gerrit
requestLog = true
[cache]
directory = cache
[download]
scheme = ssh
scheme = http
scheme = anon_http
scheme = anon_git
scheme = repo_download
[mimetype "image/*"]
safe = true
[mimetype "application/pdf"]
safe = true
[mimetype "application/pdm"]
safe = true
[mimetype "application/msword"]
safe = true
[pack]
deltacompression = true
threads = 2
[receive]
allowGroup = Administrators
[upload]
allowGroup = Administrators
[repository "*"]
createGroup = Administrators
createGroup = Registred Users
ownerGroup = Registred Users
[gitweb]
cgi = /var/www/git/gitweb.cgi
url =
http://git.yotalab.ru/
=====
* httpd.conf
=============
<VirtualHost *>
ServerName
git.yotalab.ru
ServerAlias
git.tst.yotalab.ru
DocumentRoot /var/www/git
SetEnv GITWEB_CONFIG /etc/gitweb.conf
## GERRIT BEGIN
ProxyRequests Off
ProxyVia Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
# Reverse-proxy these requests to the Gerrit Jetty server
RedirectMatch ^/gerrit$ /gerrit/
ProxyPass /gerrit/
http://127.0.0.1:8081/gerrit/
## GERRIT END
ScriptAlias /cgi-bin/ "/var/www/git/"
# ScriptAlias /git/ "/var/www/githttp/"
SetEnv GIT_PROJECT_ROOT /srv/git
SetEnv GIT_HTTP_EXPORT_ALL
SetEnv REMOTE_USER=$REDIRECT_REMOTE_USER
# ScriptAliasMatch \
# "(?x)^/(.*/(HEAD | \
# info/refs | \
# objects/(info/[^/]+ | \
# [0-9a-f]{2}/[0-9a-f]{38} | \
# pack/pack-[0-9a-f]{40}\.(pack|idx)) | \
# git-(upload|receive)-pack))$" \
# "/var/www/githttp/git-http-backend/$1"
#<Directory /var/www/githttp>
# AllowOverride None
# Options +ExecCGI
# Require valid-user
#</Directory>
<LocationMatch "^/git/">
#<Directory /var/www/githttp>
# AllowOverride None
# Options +ExecCGI
# AuthType Basic
# AuthBasicProvider ldap
# AuthzLDAPAuthoritative off
# AuthName "YOTARU Domain Credentials Required for GIT"
# Require valid-user
#</Directory>
</LocationMatch>
<Directory /var/www/git>
Options +ExecCGI
AddHandler cgi-script .cgi
DirectoryIndex gitweb.cgi
</Directory>
# turning on mod rewrite
RewriteEngine on
# make the front page an internal rewrite to the gitweb script
RewriteRule ^/$ /cgi-bin/gitweb.cgi [QSA,L,PT]
# look for a public_git folder in unix users' home
#
http://git.example.org/~<user>/
#RewriteRule ^/\~([^\/]+)(/|/gitweb.cgi)?$ /cgi-bin/gitweb.cgi
[QSA,E=GITWEB_PROJECTROOT:/home/$1/public_git/,L,PT]
#
http://git.example.org/+<user>/
#RewriteRule ^/\+([^\/]+)(/|/gitweb.cgi)?$ /cgi-bin/gitweb.cgi
[QSA,E=GITWEB_PROJECTROOT:/home/$1/public_git/,L,PT]
#
http://git.example.org/user/<user>/
#RewriteRule ^/user/([^\/]+)/(gitweb.cgi)?$ /cgi-bin/gitweb.cgi
[QSA,E=GITWEB_PROJECTROOT:/home/$1/public_git/,L,PT]
# defined list of project roots
RewriteRule ^/scm(/|/gitweb.cgi)?$ /cgi-bin/gitweb.cgi
[QSA,E=GITWEB_PROJECTROOT:/pub/scm/,L,PT]
RewriteRule ^/var(/|/gitweb.cgi)?$ /cgi-bin/gitweb.cgi
[QSA,E=GITWEB_PROJECTROOT:/var/git/,L,PT]
# make access for "dumb clients" work
RewriteRule ^/(.*\.git/(?!/?(HEAD|info|objects|refs)).*)?$ /cgi-
bin/gitweb.cgi%{REQUEST_URI} [L,PT]
</VirtualHost>
=============