2

在合并到我的 Github 存储库之前,我想使用 gerrit 进行代码审查。

首先,我在此之后将 gerrit 服务器安装到本地机器上。以下是我在初始化 gerrit 服务器时输入的内容:

$ java -jar gerrit-war/target/gerrit-2.6-SNAPSHOT.war init -d ../test_site

*** Gerrit Code Review 2.4.2-689-g10b8774
*** 

Create '/Users/pj/git/test_site' [Y/n]? 

*** Git Repositories
*** 

Location of Git repositories   [git]: 

*** SQL Database
*** 

Database server type           [H2/?]: ?
       Supported options are:
         h2
         postgresql
         mysql
         jdbc
Database server type           [H2/?]: 

*** User Authentication
*** 

Authentication method          [OPENID/?]: ?
       Supported options are:
         openid
         openid_sso
         http
         http_ldap
         client_ssl_cert_ldap
         ldap
         ldap_bind
         custom_extension
         development_become_any_account
Authentication method          [OPENID/?]: development_become_any_account

*** Email Delivery
*** 

SMTP server hostname           [localhost]: 
SMTP server port               [(default)]: 
SMTP encryption                [NONE/?]: 
SMTP username                  : PJ Kim
PJ Kim's password              : 
              confirm password : 

*** Container Process
*** 

Run as                         [pj]: 
Java runtime                   [/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/jre]: 
Copy gerrit.war to /Users/pj/git/gerrit/../test_site/bin/gerrit.war [Y/n]? 
Copying gerrit.war to /Users/pj/git/gerrit/../test_site/bin/gerrit.war

*** SSH Daemon
*** 

Listen on address              [*]: 
Listen on port                 [29418]: 

Gerrit Code Review is not shipped with Bouncy Castle Crypto v144
  If available, Gerrit can take advantage of features
  in the library, but will also function without it.
Download and install it now [Y/n]? 
Downloading http://www.bouncycastle.org/download/bcprov-jdk16-144.jar ... OK
Checksum bcprov-jdk16-144.jar OK
Generating SSH host key ... rsa... dsa... done

*** HTTP Daemon
*** 

Behind reverse proxy           [y/N]? 
Use SSL (https://)             [y/N]? 
Listen on address              [*]: 
Listen on port                 [8080]: 

*** Plugins
*** 

No plugins found.
Initialized /Users/pj/git/test_site
Executing /Users/pj/git/gerrit/../test_site/bin/gerrit.sh start
Starting Gerrit Code Review: OK
Waiting for server to start ... OK
Opening browser ...
$

浏览器打开,我创建了一个帐户,登录。然后我点击“项目>创建新项目”,只填写“项目名称”,然后点击“创建项目”按钮。

我可以看到在“项目 > 列表”上创建的项目名称,但不知道如何将我的 github 存储库(例如git@github.com:philipjkim/vimrc.git)连接到 gerrit 项目。感谢您的任何建议/更正。

4

1 回答 1

2

如果您想将现有存储库(从 gi​​thub 或其他地方)推送到 Gerrit,我们刚刚在基于 github 项目的让本地 gerrit 和存储库工作(包括分支)中讨论了这个问题。祝你好运!

于 2012-09-07T14:57:15.037 回答