Gerrit
From OMAPpedia
Contents |
[edit] Setting up your Account with Gerrit:
- Goto review.source.android.com and click the ‘sign in’ tab on top right corner.
- There are various ways to sign in, (Preferably use your Google account)- pick the one that works for you (If you don't have any of those accounts - create one)
- Click on the settings menu in the top right corner. Then select the "Contact Information" tab. Make sure you fill out the name and email fields (TI email address) and save it. You can now logout and close the browser.
- You will get an email from Android Code Review to your registered TI email address. Just click the included link for verification of the email address.
- Click on the settings menu in the top right corner and click on the "SSH Keys" tab. Upload your ssh public key
- Not sure how to get SSH - click on the "Guide to SSH Key's" link and follow the instructions for your OS.
- Copy the ssh key from id_dsa.pub and paste it in the ‘Add SSH key’ space and click on add tab below.
- Here are some additional tips for setting your SSH:
[~/.ssh]$ ssh-keygen -t dsa Generating public/private dsa key pair. Enter file in which to save the key (/home/tom/.ssh/id_dsa):Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/tom/.ssh/id_dsa. Your public key has been saved in /home/tom/.ssh/id_dsa.pub. The key fingerprint is:50:43:77:c6:97:af:61:82:dc:ea:9b:6b:67:d4:1b:61 tom@volcano
- Enter your linux machine login username in SSH Username textbox and click ChangeUsername button.
- Click on the ‘Identities’ tab anad make sure that your TI email address appears there.
- Now click on the agreement tab, then click on ‘New Contributor Agreement’ and select Corporate, enter I AGREE in the agreement space and enter ‘submit agreement’ tab.
- Now goto review.omapzoom.org click the ‘sign in’ tab on top right corner.
- Sign in with the same id (Google or Yahoo) you used before
- Click on the settings menu in the top right corner. Then select the "Contact Information" tab. Make sure you fill out the name and email fields (use the same email address you registered before with review.source.android.com) and save it. Logout and close the browser.
- You will get an email from Gerrit Code Review to your registered TI email address. Just click the included link for verification of the email address.
- Click on the settings menu in the top right corner and click on the "SSH Keys" tab. Paste the same public key as above in the ‘Add SSH key’ space and click on add tab below
- Enter your linux machine login username in SSH Username textbox and click ChangeUsername button.
[edit] SSH Proxy Setup:
- The repo tool uses ssh to access Gerrit. If you are not behind a firewall, then if the keys are correct, everything should be fine
- However, if you are behind a firewall (as here in TI), you will need to tell ssh about it.
- Download the corkscrew tool package and install.
- Add the following to your ~/.ssh/config file and substitue your path to corkscrew where it says "
"
Host review.omapzoom.org port 29418 proxycommand/corkscrew 80 %h %p Host review.source.android.com port 29418 proxycommand /corkscrew 80 %h %p Note: Write without 'http://'
[edit] Testing the Connection:
- Log into your account on Gerrit and click on the "Settings" menu. Note your SSH Username (under the SSH Keys tab ).
- Now issue the following command from the machine(s) you plan on using for 'repo upload'.
ssh -p 29418@review.omapzoom.org
- If it comes back with:
gerrit: no shell availableConnection to review.omapzoom.org closed.
you are good to go :)
[edit] Commit Patches
curl http://review.omapzoom.org/tools/hooks/commit-msg > .git/hooks/commit-msg curl http://review.omapzoom.org/tools/hooks/commit-msg > .git/hooks/applypatch-msg chmod a+x .git/hooks/commit-msg .git/hooks/applypatch-msg
git addgit commit -s
OR
git am
[edit] Pushing changes
git push ssh://@review.omapzoom.org:29418/ HEAD:refs/for/
e.g. git push ssh://:29418/device/ti/pandaboard HEAD:refs/for/gingerbread
[edit] Adding reviewers
visit review.omapzoom.org