1. Create you SSH-key.
If you've already generated it, you don't need to regenerate it !
else:
$ssh-keygen -t rsa -C your-email
Now the public key will be located in ~/.ssh/id_rsa.pub
2. Add your key to Gerrit server.
$cat ~/.ssh/id_rsa.pub
• Open web of gerrit , sign in
• Click “Settings” and then “SSH Public keys”. Paste the entire contents of your ~/.ssh/id_rsa.pub into the textbox and click the “add” button.
3. Create or edit the file ~/.ssh/config and add configuration.
$sudo apt-get install vim (you need know a little VIM, if not, please use gedit)
$vi ~/.ssh/config or gedit ~/.ssh/config
Paste and edit the following content:
Host gerrit1
HostName XXXXX
Port 29418
User your-gerrit-login-username
IdentityFile ~/.ssh/id_rsa
$chmod og-rwx ~/