[See the document Install Gerrit in Tomcat under Windows on how to install Gerrit.]
To effectively work with Gerrit, you use SSH. The need to enter a password is substituted by transmitting a key. This authentication method allows for background processing and automation. First step is to create a SSH key and make Gerrit aware of that key. Gerrit comes with a documentation explaining how to create and add the SSH key. To see this dialog, log on to Gerrit, open the settings page and select the SSH Public Keys option.
To follow this documentation on Windows, it means to:
The first 3 steps generate a private and public key. The private key will stay on the user home directory, the public key will be added to Gerrit.
The public key is id_rsa.pub. Open this file to see your public key.
Copy the public key into clipboard and paste it to Gerrit: open the SSH Public Keys page and add the public key generated above.
As a result, your public key is added to Gerrit, allowing you to log on to Gerrit using SSH and not be prompted to enter a password.
To test if Gerrit is accepting automatic logon via SSH, just connect to the Gerrit’s SSH server. By default, the SSH server is listening on port 29418. Open Git bash and issue the command
ssh –p 29418 <username>@localhost
If everythink works, the result should look like:
It is very likely that when running the above SSH command, that you won't get automatically logged on, but instead see this message: Could not open a connection to your authentication agent.
This means that SSH is not able to use your private key. Follow the steps outlined at [1] to start the ssh-agent process.
exec ssh-agent bash
ssh-add path/to/.ssh/id_rsa
Now add your identity by opening git bash and run
Now ssh will be able to use your private key.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
5 | |
5 | |
5 | |
5 | |
4 | |
4 | |
4 | |
3 | |
3 |