gerrit
gerrit
1. Install Gerrit
CentOS release 6.2 (Final)
Linux localhost 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux
vi /etc/selinux/config
SELINUX=disabled |
reboot
service iptables stop
chkconfig iptables off
rpm -Uvh mod_wsgi-3.3-7.1.x86_64.rpm
wget
cp gerrit-2.7.war /opt/
cd /opt
sh jdk-6u25-linux-x64.bin
service mysqld start
mysqladmin -u root password 123456
mysql -uroot -p123456
mysql> create user 'gerrit'@'localhost' identified by 'secret';
mysql> create database gerrit;
mysql> alter database gerrit charset=latin1;
mysql> grant all on gerrit.* to 'gerrit'@'localhost';
mysql> flush privileges;
mysql> status;
mysql> quit
java -jar gerrit-2.7.war init -d /opt/gerrit/
vi gerrit/etc/gerrit.config
[gerrit] basePath = git canonicalWebUrl = [database] type = mysql hostname = localhost database = gerrit username = gerrit [auth] type = LDAP [ldap] server = ldap://172.16.10.181:30251 username = cn=Manager,dc=example,dc=com password = mmjjjj accountBase = ou=People,dc=example,dc=com accountPattern = (&(objectClass=*)(uid=${username})) accountFullName = uid accountEmailAddress = mail [sendemail] smtpServer = smtp.163.com smtpUser = code from = smtpPass = 1111111 [container] user = root javaHome = /opt/jdk1.6.0_25/jre [sshd] listenAddress = *:29418 [httpd] listenUrl = http://*:8080/gerrit [cache] directory = cache |
/opt/gerrit/bin/gerrit.sh start
tail -f /opt/gerrit/logs/error_log
Close the anonymous permissions
2. The installation of Linux git client
General use Linux with Git
ssh-keygen -t rsa
The contents of the.Ssh/id_rsa.pub file copy to the following positions in the Gerrit is stored
Test connection
ssh wangjian@172.16.10.72 -p 29418
To configure
git clone ssh://wangjian@172.16.10.72:29418/test
cd test
scp -p -P 29418 wangjian@172.16.10.72:hooks/commit-msg .git/hooks/
scp -p -P 29418 wangjian@172.16.10.72:bin/gerrit-cherry-pick .
A test submission
date > testfile.txt
git add testfile.txt
git commit -m "My pretty test commit"
git push origin HEAD:refs/for/master
3. The installation of windows git client
Install Git-1.8.3-preview20130601.exe
The default installation
Install TortoiseGit-1.8.3.0-32bit.msi
The installation steps to select "TortoisePlink". Other steps to default on the line!
Key generation
The public key stored in the Gerrit copy to
Download the library
Download
Put a commit-msg in the test/.git/hooks directory
Download
Willgerrit-cherry-pickIn the test/ directory
A test submission
https://github.com/pubyun/testing
4. git-repo
https://github.com/esrlabs/git-repo
5. git-review
Posted by Judy at February 21, 2014 - 2:29 PM