2013年4月30日 星期二

Gerrit 使用 http 驗証

version : gerrit-full-2.5.2.war

(gerrit)$ ./review_sites/bin/gerrit.sh stop
(gerrit)$ vi ./review_sites/etc/gerrit.config
[gerrit]
        basePath = git
[database]
        type = MYSQL
        hostname = localhost
        database = reviewdb
        username = gerrit
[auth]
        type = HTTP
[sendemail]
        smtpServer = localhost
[container]
        user = gerrit
        javaHome = /usr/lib/jvm/java-6-openjdk-amd64/jre
[sshd]
        listenAddress = *:29418
[httpd]
        listenUrl = proxy-http://127.0.0.1:8081/
[cache]
        directory = cache
(gerrit)$ ./review_sites/bin/gerrit.sh start


# vi /etc/apache2/sites-enabled/000-default

    ProxyRequests Off
    ProxyVia Off
    ProxyPreserveHost On

 
    Order deny,allow
    Allow from all
 


 
    AuthType Basic
    AuthName "Gerrit Code Review"
    Require valid-user
    AuthBasicProvider file
    AuthUserFile /home/gerrit/review_sites/etc/htpasswd_gerrit
 


    ProxyPass / http://127.0.0.1:8081/
#    ProxyPassReverse / http://127.0.0.1:8081/
# /etc/init.d/apache2 restart




Reference :
Gerrit复核服务器搭建简易教程(Ubuntu 12.10)
Chromatic Coder: 架設Gerrit和Git

沒有留言:

張貼留言