Gerrit is a distributed version control system review tool that can be used to upload patches for review and ultimate merging with the repository. It provides a Git interface and acts as a remote Git server, so using it with existing tools or command lines is trivial.
A password is required in order to push changes to Gerrit. This can be done either through a Gerrit-specific randomly generated HTTP password, or through an uploaded SSH key. Note that while the e-mail address and login details used to access Gerrit are the same as for Bugzilla, for pushing changes through Git a different password is used.
gitroot
for r
in the URL.~/.ssh/id_rsa
or ~/.ssh/id_dsa
—but using a host-specific name such as ~/.ssh/id_rsa-gerrit
may be sensible. The private key can then be selected on the command line, or through an entry in the ~/.ssh/config
file:Host git.eclipse.org IdentityFile ~/.ssh/id_rsa-gerrit User myusername
ssh
into Gerrit works as expected, using port 29418
:$ ssh -p 29418 git.eclipse.org **** Welcome to Gerrit Code Review **** Hi My Name, you have successfully connected over SSH. Unfortunately, interactive shells are disabled. To clone a hosted Git repository, use: git clone ssh://[email protected]:29418/REPO_NAME.git Connection to git.eclipse.org closed.
On Windows, the command-line tool plink
can be used to perform ssh connections. This is part of the putty
package which is available from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html. In order to use this from Eclipse or command line, set an environment variable GIT_SSH
to point to the full path of the plink
executable.
Setting up a Gerrit account is necessary in order to be able to push changes to the review system. The majority of development with Eclipse is done with Gerrit and being able to trigger builds and run tests automatically is a key advantage.
Gerrit can be authenticated using a randomly generated HTTP password, or through an SSH interface running on port 29418
. These are separate from the Eclipse account information used to log into Bugzilla and other tools.
Using an SSH connection is generally easier on Linux and macOS servers, because the information can be stored securely in the keychain or through a key agent. It may be easier to use HTTP as a communication protocol on Windows, or when behind a firewall.
It's possible to test the connection to Gerrit using the command line and see if the Welcome message is displayed. This is worth doing to verify that it has been set up correctly before trying to push code.
3.138.200.66