Configure git and gerrit


The recommended version of git is 2.7.4 or later. Check the installed version in the Ubuntu VM:

git --version

Create an SSH key to user with gerrit. Use no passphrase.

ssh-keygen -t rsa

Enter your SSH public key (id_rsa) into gerrit:

  • Select “Settings”
  • In the “Settings” sidebar, click “SSH Public Keys”`
  • Click “Add Key…”
  • Paste the entire contents of $HOME/.ssh/ into the text area and click “Add”.

Install the git-review package.

sudo apt update
sudo apt install git-review
Create $HOME/.gitconfig (replace highlighted values with your own information):


name = FirstName LastName

email =


autocrlf = false


tool = vimdiff


username = YourLinuxFoundationId

If you’re behind a corporate firewall and your proxy server has SOCKS support…

You may be able to use the SSH protocol with git, which is preferred versus HTTP. This method is known to work in the AT&T corporate network. Install the socat package, which allows you to tunnel SSH connections through a proxy that supports SOCKS:

sudo apt update
sudo apt install socat

Create (or append to) $HOME/.ssh/config (replace highlighted values with your information)


User userid


ProxyCommand socat - PROXY:host:%h:%p,proxyport=port

IdentityFile /home/userid/.ssh/id_rsa

ServerAliveInterval 10

Verify that you have connectivity to gerrit through the proxy. Answer “yes” to continue connecting, if prompted.

ssh -p 29418