git tutorial eclipsecon france 2014 - gerrit exercise 9 - starting demo gerrit

4
EGit/Gerrit Hands-on training #7: Starting Demo Gerrit If you don’t have access to Gerrit at http://git.eclipse.org/r/ you may do the exercises locally using a pre-configured demo Gerrit instance. This exercise describes how to install and start that. Prerequisite Gerrit requires a Java 7 installation. Installation Unzip <stick>/git-tutorial/gerrit/gerrit-2.9rc2.zip into a folder having no blanks in its path name. This will yield a folder gerrit-2.9rc2 containing a pre-configured Gerrit demo instance already containing the example repository. Starting Demo Gerrit From a command shell cd to the folder gerrit_site. run the following command to start the server (Gerrit 2.9 requires Java 7) $ java -jar bin/gerrit.war daemon -d . this starts Gerrit, to stop it again kill the running process using CTRL-C if something goes wrong look into the logs folder If you have a unix-like shell you can also start and stop gerrit with ./bin/gerrit.sh start/stop Configuration

Upload: msohn

Post on 11-Nov-2014

105 views

Category:

Software


1 download

DESCRIPTION

Git Tutorial EclipseCon France 2014 - Gerrit Exercise

TRANSCRIPT

Page 1: Git Tutorial EclipseCon France 2014 - Gerrit Exercise 9 - starting demo gerrit

EGit/Gerrit Hands-on training #7:Starting Demo GerritIf you don’t have access to Gerrit at http://git.eclipse.org/r/ you may do the exercises locally using a pre-configured demo Gerrit instance. This exercise describes how to install and start that.

PrerequisiteGerrit requires a Java 7 installation.

InstallationUnzip <stick>/git-tutorial/gerrit/gerrit-2.9rc2.zipinto a folder having no blanks in its path name. This will yield a folder gerrit-2.9rc2 containing a pre-configured Gerrit demo instance already containing the example repository.

Starting Demo Gerrit● From a command shell cd to the folder gerrit_site.● run the following command to start the server (Gerrit 2.9 requires Java 7)

$ java -jar bin/gerrit.war daemon -d .

● this starts Gerrit, to stop it again kill the running process using CTRL-C● if something goes wrong look into the logs folder● If you have a unix-like shell you can also start and stop gerrit with ./bin/gerrit.sh

start/stop

Configuration

Page 2: Git Tutorial EclipseCon France 2014 - Gerrit Exercise 9 - starting demo gerrit

The demo Gerrit has 3 pre-configured user accounts● admin (Andrew Admin): has administration privileges● developer01 (A Developer)and developer02 (B Developer): have all except

administrative Gerrit privileges.

The demo Gerrit runs in a developer mode hence no real authentication is required to logon to the Gerrit WebUI:

● open http://localhost:8080/ in a browser● to logon, click Become in the top right corner

● Choose one of the preconfigured developer accounts “A Developer” (account “developer01”) or “B Developer” (account “developer02”)

● The demo instance is configured to not send email as this wouldn’t make much sense if you are offline.

Page 3: Git Tutorial EclipseCon France 2014 - Gerrit Exercise 9 - starting demo gerrit

● Generate the HTTP password for the logged on user athttp://localhost:8080/#settings,http-password

● If you want to use SSH protocol upload your public SSH key athttp://localhost:8080/#settings,ssh-keys

● You can’t register your real email address as the demo instance has disabled email integration. Simply use your real email address instead. This will work as both demo users have the Gerrit privilege +2 Forge Committer or Tagger Identity this means the email address contained in git commits pushed to the server isn’t checked against the email address of the user logged on to Gerrit.

● If you do the exercises using the local demo Gerrit the URLs for git communication with Gerrit are:

○ HTTP protocol : http://localhost:8080/egit-training.git○ if you are using native Git ensure that http_proxy isn’t in your way, you may need

to set $export no_proxy=localhost○ SSH protocol: ssh://developer01@localhost:29418/egit-training.git○ Gerrit WebUI is reachable under : http://localhost:8080/

Page 4: Git Tutorial EclipseCon France 2014 - Gerrit Exercise 9 - starting demo gerrit

Copyright © 2014 by M. Sohn, S. Lay, S.Zivkov