Gerrit credentials setup (for Chromium OS and Chrome OS)

Introduction

If you want gerrit access for non-Chromium OS/Chrome OS projects, please use the old instructions here

We have two gerrit instances: Chromium OS and the (internal) Chrome OS gerrit instance.

For the Chromium OS instance: This is where most of the development happens. You do not have to be an "official" Chromium contributor or Googler or anything else to interact with the Chromium OS gerrit instance and/or upload changes to it.  We restrict access by only allowing certain people to approve changes before they're allowed to go into the main tree.  

For the internal Chrome OS instance: Access is restricted to Googlers.

The gerrit instance for Chromium OS and Chrome OS uses Google Accounts to provide authentication. This means any account you can use to log into google.com can also be used to authenticate with Gerrit.

(EVERYONE) To get access to the Chromium OS gerrit instance:

  1. Go to https://chromium-review.googlesource.com/new-password
  2. Log in with the email you use for your git commits.
    1. If you are a Googler, use your @chromium.org account.
    2. You can verify this by ensuring that the Username field looks like git-<user>.chromium.org
  3. Follow the directions on the new-password page to set up/append to your .netrc file.
  4. Run the following commands (these ensure that git will always hit the authenticated APIs):
    git config --global "url.https://chromium.googlesource.com/a/.insteadOf" "https://chromium.googlesource.com/"
    git config --global --add "url.https://chromium.googlesource.com/a/.insteadOf" "https://chromium.googlesource.com/a/"
  5. Verification: Run `git ls-remote https://chromium.googlesource.com/a/chromiumos/manifest.git`
    1. This should not prompt for any credentials, and should just print out a list of git references.
  6. Make sure to set your real name.
    1. Visit https://chromium-review.googlesource.com/#/settings/ and check the "Full Name" field.

(Googler) To get access to the internal Chrome OS gerrit instance:

  1. You must also do the steps above for your @chromium account first
  2. Go to http://google.com/ and verify you are logged into your @google.com account
  3. In the same window and session, load https://chrome-internal-review.googlesource.com/new-password
    1. Make sure you are logged into your @google.com account. 
    2. You can verify this by ensuring that the Username field looks like git-<user>.google.com
  4. Follow the directions on the new-password page to append to your .netrc file.
  5. Verification: Run `git ls-remote https://chrome-internal.googlesource.com/a/chromeos/manifest-internal.git`
    1. This should not prompt for any credentials, and should just print out a list of git references.

For more non-chromium-specific info on using repo to interact with gerrit, read Android's Git Workflow using repo/gerrit and life of a patch.

Uploading your changes for review

You can use "repo upload . --cbr" (instead of "git cl upload").  Use "repo help" for options on adding reviewers and CC'ing developers from the command line.  You can do this from the Gerrit web interface too once you upload the change.

More documentation on Uploading changes for review.

Watching Projects

You can select Projects (and branches) you want to "watch" for any changes on by adding the Project under Account Settings --> Watched Projects

Please feel free to add/modify any other Gerrit related information you think may be useful for other developers here.

Not getting email?

In case you think you should be receiving email from Gerrit but don't see it in your inbox, be sure to check your spam folder.  It's possible that your mail reader is mis-classifying email from Gerrit as spam.

Still having a problem?

Check out the Gerrit Documentation to see if there are hints in there.

If you have any problems please open a Build Infrastructure issue on the Chromium issue tracker (the "Build Infrastructure" template should be automatically selected).