我使用HTTP認證在gerrit安裝時遇到問題。Gerrit與Apache2 - 當HTTP請求轉發請求到Gerrit代碼審查時,HTTP服務器在Authorization標頭中沒有提供用戶名
這是我gerrit.config:
[gerrit]
basePath = git
serverId = fee746a4-35f5-43e5-a39f-e2e77ce5bd7c
canonicalWebUrl = http://127.0.0.1:9091/
[database]
type = h2
database = /home/mapa/gerrit_example/db/ReviewDB
[auth]
type = HTTP
[receive]
enableSignedPush = false
[sendemail]
smtpServer = localhost
[container]
user = root
javaHome = /usr/lib/jvm/java-8-openjdk-amd64/jre
[sshd]
listenAddress = *:29418
[httpd]
listenUrl = http://*:9090/
[cache]
directory = cache
和我在Apache虛擬主機配置:
Listen 9091
<VirtualHost *:9091>
ServerName 127.0.0.1
ProxyRequests Off
ProxyVia Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location /login/>
AuthType Basic
AuthName "Gerrit Code Review"
AuthBasicProvider file
AuthUserFile /media/sf_shared/.htpasswd
Require valid-user
</Location>
AllowEncodedSlashes On
ProxyPass/http://127.0.0.1:9090/
</VirtualHost>
所有我所得到的是 result
我按照其他教程和解決方案類似的問題,但沒有結果。在端口9091
那麼您如何訪問Gerrit?應該通過端口9091 – StephenKing