zoukankan      html  css  js  c++  java
  • 【Gerrit】gerrit server搭建

    Part 1  Gerrit Prerequisites:

    1. 1.Java JDK>1.7
    2. 2.Git
    3. 3.SSH server
    4. 4.DB
    part 2 Set local gerrit server:
    1. $ java -jar ./gerrit-2.11war init -d review_site
    DefaultSecureStore:
    1. #除以下选项外,其他选默认即可
    2. Database server type [h2]: h2
    3. Authentication method [OPENID/?]:development_become_any_account
    4. Listen on port [29418]:9420
    5. Create adminstrator user [Y/n]?
    6. username [admin]:ext-huaqin-wangpengfei(电脑用户名)
    7. name [Administrator]:wangpengfei
    8. email [admin@example.com]:wangpengfei@huaqin.com
    9. HTTP password [secret]:
    open http://10.0.0.9:9420/#/admin/prjects/
    part 3 push all projects to gerrit:
    1. $ repo forall -c 'echo $REPO_PROJECT; ssh -p 9420 admin@localhost gerrit create-project --name $REPO_PROJECT'
    attention:REPO_PROJECT 为sever名
                   REPO_PATH为本地路径名
                    这条语句执行后只是依据本地工程结构构建sever端的工程结构,工程本身为空
    1. $ repo formall -c 'echo $REPO_PROJECT; git push ssh://ramon@localhost:9420/$REPO_PROJECT +refs/heads/*;'
                    这条语句推送所有的branch
    1. $ repo formall -c 'echo $REPO_PROJECT; git push ssh://ramon@localhost:9420/$REPO_PROJECT +refs/tags/*;'
                    这条语句推送所有的tags
    attention:推送tags时我们会遇到权限问题
                     在gerrit文档中我们可以查看到我们所有需的权限信息
                      
                       因为所有的工程都是继承至 All-projects 所以我们在All projects的Access下增加如下三个权限完成tag推送工作
                       
      至此,我们的local gerrit server搭建完成!
     
                                                                                                                                                                                                                                                                                           ---By Amzaon Train 
     





    作者:苏徽.W

    出处:http://www.cnblogs.com/perfe/

    本文版权归作者和博客园共有,欢迎转载,希望大家能够多多评论交流哦。

  • 相关阅读:
    nagios对windows流量的检测
    Zabbix中文使用手册
    SNMP的应用
    十大经典排序算法最强总结(含JAVA代码实现)
    各种排序算法总结和比较
    MyBatis的Insert操作详解
    MyBatis 返回insert操作主键
    MyBatis insert/delete/update 的返回值
    利用aopc创建schema失败
    neo4j开发自定义存储过程注意事项
  • 原文地址:https://www.cnblogs.com/perfe/p/5621439.html
Copyright © 2011-2022 走看看