Generating SSH Key
After that it will ask for the key location, for default press enter.
Then it will ask you to add password, for blank pass press enter.
If u want to add any password you can do it, that password is always required when you push commits.
Setting up Gerrit account
Open the Gerrit website you want to configure and Sign-up with your GitHub. After successful sign-up go to http://<gerrit_link>/#/settings/contact
and register your email, and then go to http://<gerrit_link>/#/settings
, make sure every information is filled up correctly.
Adding SSH Key to Gerrit
Open your terminal and type:
Copy the SSH key and paste it on http://<gerrit_link>/#/settings/ssh-keys
and save it.
Creating config file
First type:
And add these details there:
Save and exit the file after doing so.
Granting required permissions
Type the following commands:
Checking everything
To check everything is fine, do a connection Test by typing → ssh <gerrit_link>
(Type yes if they ask for it)
If you get the above output message, your Gerrit is configured.
Pushing changes to Gerrit
Commit all required changes you need to push and use the below command to add hook to it:
Then use the following command to push:
Everything is configured and you’re good to go now!