Gerrit Code Review - Quickstart

If you would like to contribute to our source code, but you’ve experienced some issues in pushing to our Gerrit Code Review or simply need some help - this tutorial is for you.

Remember you can always message us on our telegram chat!

Setting up connection to Gerrit

  1. Go to the PixelBuilds Gerrit

  2. Sign in with your GitHub account

  3. Head to the Settings

  4. Note your username (it will match your GitHub username) - it’s going to be needed in a second

  5. Go to the SSH Keys section

  6. If you are using SSH keys with GitHub, verify those are present here

  7. If you are not using SSH keys:

    1. Generate your key:

      ssh-keygen -t ed25519
    2. View it with:

      cat ~/.ssh/id_ed25519.pub`
    3. Paste the key in the correct field and click “Add new SSH key”

    4. Verify whether everything is correct:

      ssh -p 29418 your_username@review.pixelbuilds.org

NOTE: If GitHub/Gerrit username matches OS username it can be ommited.

If you have done everything correctly you should a very simmilar result to this:

[buildbot@pixelbuilds ~]$ ssh -p 29418 review.pixelbuilds.org

  ****    Welcome to Gerrit Code Review    ****

  Hi buildbot, you have successfully connected over SSH.

  Unfortunately, interactive shells are disabled.
  To clone a hosted Git repository, use:

  git clone ssh://buildbot@review.pixelbuilds.org:29418/REPOSITORY_NAME.git

Connection to review.pixelbuilds.org closed.

If something goes wrong and you can’t connect to the Gerrit, contact us on our Telegram chat for further assistance. Don’t forget to attach the output of the following command, preferably on a pastebin-like service like kat.bin or GitHub Gists:

ssh -p 29418 your_username@review.pixelbuilds.org -vv

Pushing to Gerrit

For every repository that is tracked from PixelBuilds a remote can be easly generated with the URL of the repository with pbremote command.

NOTE: If the command can’t be found, you must first:

source build/envsetup.sh

NOTE: If your username in Gerrit doesn’t match OS username you can set the username that will be used with the above command with:

git config --global review.review.pixelbuilds.org.username your_username

For example in build/make:

[przekichane@snow ~/pixelbuilds/unity/build/make]$ pbremote
Remote 'pbgerrit' created
[przekichane@snow ~/pixelbuilds/unity/build/make]$ git remote get-url pbgerrit
ssh://review.pixelbuilds.org:29418/PixelBuildsROM/android_build

To finally push your HEAD:

git push pbgerrit HEAD:refs/for/unity

Or to push one commit:

git push pbgerrit <commit SHA>:refs/for/unity

For example:

git push pbgerrit f08cc7ae36e54702064632e7cd78b2ef202153b3:refs/for/unity
PixelBuilds
Copyright © 2024 PixelBuilds Design by @dvrkplayer, code by @przekichane