如何将我的github repo添加到本地gerrit服务器?

时间:2012-09-07 08:42:40

标签: git github gerrit

我想在合并到我的Github回购之前使用gerrit进行代码审查。

首先,我在this之后将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 ...
$

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

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

1 个答案:

答案 0 :(得分:2)

如果您想将现有存储库(从github或其他地方)推送到Gerrit,我们只是在Getting local gerrit and repository working (including branches) based on a github project进行了讨论。祝你好运!