Merge "Documentation: update version references for 2.2.2"

This commit is contained in:
Edwin Kempin
2012-02-09 23:38:16 -08:00
committed by gerrit code review

View File

@@ -46,8 +46,8 @@ We will run the service as a non privileged user on your system.
First create the user and then become the user: First create the user and then become the user:
---- ----
sudo adduser gerrit2 $ sudo adduser gerrit2
sudo su gerrit2 $ sudo su gerrit2
---- ----
If you don't have root privileges you could skip this step and run gerrit If you don't have root privileges you could skip this step and run gerrit
@@ -64,9 +64,9 @@ You can choose from different versions to download from here:
* http://code.google.com/p/gerrit/downloads/list[A list of releases available] * http://code.google.com/p/gerrit/downloads/list[A list of releases available]
This tutorial is based on version 2.2.1, and you can download that from this link This tutorial is based on version 2.2.2, and you can download that from this link
* http://code.google.com/p/gerrit/downloads/detail?name=gerrit-2.2.1.war[Link to the 2.2.1 war archive] * http://code.google.com/p/gerrit/downloads/detail?name=gerrit-2.2.2.war[Link to the 2.2.2 war archive]
[[initialization]] [[initialization]]
@@ -76,27 +76,25 @@ Initialize the Site
It's time to run the initialization, and with the batch switch enabled, we don't have to answer any questions at all: It's time to run the initialization, and with the batch switch enabled, we don't have to answer any questions at all:
---- ----
gerrit2@host:~$ java -jar gerrit.war init --batch -d ~/gerrit_testsite gerrit2@host:~$ java -jar gerrit.war init --batch -d ~/gerrit_testsite
Generating SSH host key ... rsa(simple)... done Generating SSH host key ... rsa(simple)... done
Initialized /home/gerrit2/gerrit_testsite Initialized /home/gerrit2/gerrit_testsite
Executing /home/gerrit2/gerrit_testsite/bin/gerrit.sh start Executing /home/gerrit2/gerrit_testsite/bin/gerrit.sh start
Starting Gerrit Code Review: OK Starting Gerrit Code Review: OK
gerrit2@host:~$ gerrit2@host:~$
---- ----
When the init is complete, you can review your settings in the When the init is complete, you can review your settings in the
file `'$site_path/etc/gerrit.config'`. file `'$site_path/etc/gerrit.config'`.
Installation is complete and you're ready to start up Gerrit! An important setting will be the canonicalWebUrl which will
be needed later to access gerrit's web interface.
---- ----
gerrit2@host:~$ $site_path/bin/gerrit.sh start gerrit2@host:~$ cat ~/gerrit_testsite/etc/gerrit.config | grep canonical
Starting Gerrit Code Review: OK canonicalWebUrl = http://localhost:8080/
Waiting for server to start ... OK gerrit2@host:~$
---- ----
[[usersetup]] [[usersetup]]
The first user The first user
-------------- --------------
@@ -113,6 +111,7 @@ id_rsa and id_rsa.pub.
---- ----
user@host:~$ ls .ssh user@host:~$ ls .ssh
authorized_keys config id_rsa id_rsa.pub known_hosts authorized_keys config id_rsa id_rsa.pub known_hosts
user@host:~$
---- ----
If you have the files, you may skip the key generating step. If you have the files, you may skip the key generating step.
@@ -149,15 +148,14 @@ The key's randomart image is:
| .. | | .. |
| | | |
+-----------------+ +-----------------+
user@host:~$ user@host:~$
---- ----
Registering your key in Gerrit Registering your key in Gerrit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Open a browser and enter the canonical url you used above when initializing Open a browser and enter the canonical url you got before when
Gerrit. initializing Gerrit.
---- ----
Canonical URL [http://localhost:8080/]: Canonical URL [http://localhost:8080/]:
@@ -184,6 +182,7 @@ about our new key and can identify us by it.
---- ----
user@host:~$ cat .ssh/id_rsa.pub user@host:~$ cat .ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA5E785mWtMckorP5v40PyFeui9T50dKpaGYw67Mlv2J3aGBG3tS0qBQxKEpiV0J4+W0RgQHbWfNqdUYen9bC5VVH/GatYWkpL9TjjUcHzF1rX3Eyv7PHuHLAyd/8Zdv6R3saF+hNpp1JW0BSa7HXzK7iNCVA3kBuBthxeGh3OoFbaXHn1zwwVQw8I5+Lp9OOIY7sJEsM/kW699XDV6z2zlkByNVEp45j+g26x5rCnGS8GJM7A0uHsaWJddO6TiyR6/2SOBF1VtKw49XLTQcmDInFAZzUsAZSDKlfYloPkpA6YdqeG0eJqau+jtzuigydoVj4j9xidcJ9HtxZcJNuraw== user@host ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA5E785mWtMckorP5v40PyFeui9T50dKpaGYw67Mlv2J3aGBG3tS0qBQxKEpiV0J4+W0RgQHbWfNqdUYen9bC5VVH/GatYWkpL9TjjUcHzF1rX3Eyv7PHuHLAyd/8Zdv6R3saF+hNpp1JW0BSa7HXzK7iNCVA3kBuBthxeGh3OoFbaXHn1zwwVQw8I5+Lp9OOIY7sJEsM/kW699XDV6z2zlkByNVEp45j+g26x5rCnGS8GJM7A0uHsaWJddO6TiyR6/2SOBF1VtKw49XLTQcmDInFAZzUsAZSDKlfYloPkpA6YdqeG0eJqau+jtzuigydoVj4j9xidcJ9HtxZcJNuraw== user@host
user@host:~$
---- ----
Copy the string starting with ssh-rsa to your clipboard and then paste it Copy the string starting with ssh-rsa to your clipboard and then paste it
@@ -232,10 +231,10 @@ This is done via the SSH port:
user@host:~$ user@host:~$
---- ----
This will create a test repository to work with. This will create a repository that you could clone to work with.
Previous project exist Already existing project
~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~
The other alternative is if you already have a git project that you The other alternative is if you already have a git project that you
want to try out Gerrit on. want to try out Gerrit on.
@@ -246,6 +245,11 @@ First you have to create the project, this is done via the SSH port:
user@host:~$ user@host:~$
---- ----
You need to make sure that at least initially your account is granted
"Create Reference" privileges for the refs/heads/* reference.
This is done via the web interface in the Admin/Projects/Access page
that correspond to your project.
After that it's time to upload the previous history to the server: After that it's time to upload the previous history to the server:
---- ----
@@ -253,17 +257,18 @@ After that it's time to upload the previous history to the server:
Counting objects: 2011, done. Counting objects: 2011, done.
Writing objects: 100% (2011/2011), 456293 bytes, done. Writing objects: 100% (2011/2011), 456293 bytes, done.
Total 2011 (delta 0), reused 0 (delta 0) Total 2011 (delta 0), reused 0 (delta 0)
To ssh://user@localhost:29418/demo-project
* [new branch] master -> master * [new branch] master -> master
user@host:~/my-project$
---- ----
This will create a test repository to work with. This will create a repository that you could clone to work with.
My first change My first change
--------------- ---------------
Download a local clone of the repository Download a local clone of the repository and move into it
---- ----
user@host:~$ git clone ssh://user@host:29418/demo-project user@host:~$ git clone ssh://user@host:29418/demo-project
@@ -271,18 +276,20 @@ Download a local clone of the repository
remote: Counting objects: 2, done remote: Counting objects: 2, done
remote: Finding sources: 100% (2/2) remote: Finding sources: 100% (2/2)
remote: Total 2 (delta 0), reused 0 (delta 0) remote: Total 2 (delta 0), reused 0 (delta 0)
user@host:~$ user@host:~$ cd demo-project
user@host:~/demo-project$
---- ----
Then make a change to it and upload it as a reviewable change in Gerrit. Then make a change to it and upload it as a reviewable change in Gerrit.
---- ----
date > testfile.txt user@host:~/demo-project$ date > testfile.txt
git add testfile.txt user@host:~/demo-project$ git add testfile.txt
git commit -m "My pretty test commit" user@host:~/demo-project$ git commit -m "My pretty test commit"
[master ff643a5] My pretty test commit [master ff643a5] My pretty test commit
1 files changed, 1 insertions(+), 0 deletions(-) 1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 testfile.txt create mode 100644 testfile.txt
user@host:~/demo-project$
---- ----
Usually when you push to a remote git, you push to the reference Usually when you push to a remote git, you push to the reference
@@ -291,7 +298,7 @@ virtual branch representing "code review before submittal to branch".
This virtual name space is known as /refs/for/<branch> This virtual name space is known as /refs/for/<branch>
---- ----
git push origin HEAD:refs/for/master user@host:~/demo-project$ git push origin HEAD:refs/for/master
Counting objects: 4, done. Counting objects: 4, done.
Writing objects: 100% (3/3), 293 bytes, done. Writing objects: 100% (3/3), 293 bytes, done.
Total 3 (delta 0), reused 0 (delta 0) Total 3 (delta 0), reused 0 (delta 0)
@@ -301,6 +308,7 @@ This virtual name space is known as /refs/for/<branch>
remote: remote:
To ssh://user@localhost:29418/demo-project To ssh://user@localhost:29418/demo-project
* [new branch] HEAD -> refs/for/master * [new branch] HEAD -> refs/for/master
user@host:~/demo-project$
---- ----
You should now be able to access your change by browsing to the http URL You should now be able to access your change by browsing to the http URL