安装gerrit+http

本文介绍了如何使用HTTP方式安装和管理Gerrit,包括通过HTTP下载代码的测试步骤以及在Gerrit web界面设置和修改用户邮箱的教程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 安装maven
$ sudo apt-cache search maven
maven-debian-helper - Helper tools for building Debian packages with Maven
maven2 - Java software project management and comprehension tool
$ sudo apt-get install maven2


使用gerrit版本
gerrit2@ubuntu:~/env$ ls -l gerrit-2.6-rc1.war 
-rw-r--r-- 1 gerrit2 gerrit2 30220186 2013-04-30 09:08 gerrit-2.6-rc1.war


使能apache2反向代理模块
gerrit2@ubuntu:/etc/apache2/mods-enabled$ ls -l proxy.conf proxy.load  proxy_http.load 
lrwxrwxrwx 1 root root 28 2013-04-30 11:40 proxy.conf -> ../mods-available/proxy.conf
lrwxrwxrwx 1 root root 33 2013-04-30 11:40 proxy_http.load -> ../mods-available/proxy_http.load
lrwxrwxrwx 1 root root 28 2013-04-30 11:40 proxy.load -> ../mods-available/proxy.load


apache2配置文件
gerrit2@ubuntu:/etc/apache2$ cat sites-enabled/default 
<VirtualHost *:80>
ServerName 192.168.1.99
ProxyRequests Off  
ProxyVia Off  
ProxyPreserveHost On  


<Proxy *>  
Order deny,allow  
Allow from all  
</Proxy>  


<Location />
AuthType Basic
AuthName "Gerrit Code Review"
Require valid-user


AuthBasicProvider file
AuthUserFile /home/gerrit2/review_site/etc/passwords
</Location>


ProxyPass / http://127.0.0.1:8080/
</VirtualHost>


gerrit配置文件
gerrit2@ubuntu:~/review_site$ cat etc/gerrit.config 
[gerrit]
        basePath = git
        canonicalWebUrl = http://192.168.1.99
[database]
        type = h2
        database = db/ReviewDB
[auth]
        type = HTTP
[sendemail]
        smtpServer = localhost
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值