1

I have installed Gerrit and added my SSH key to settings. Port 29418 is opening. But now I can't login with SSH. I created jenkins user for Gerrit, neither could I correctly configure the server connection in Jenkins Gerrit Trigger.

Could you help me to check it? Thank you.

enter image description here

Flows
  • 3,675
  • 3
  • 28
  • 52
LearnToDeath
  • 53
  • 1
  • 9

1 Answers1

1

Check all steps:

  1. Generate your ssh key on your host:

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

  1. Add public key in Gerrit in: user -> settings -> ssh public key -> add key
  2. Check your connection using this command: ssh user@host -p 29418
  3. If you see Welcome to Gerrit Code Review that you have good add yours ssh key
  • My local ssh key is already exist and it works well with other applications like github and another gerrit. I think this issue may happen in gerrit server. How can I check it? – LearnToDeath Oct 05 '16 at 16:54
  • By the way, I am really confused by how it works. I mean, I have an account in gerrit, but this account is not exist in OS level(I create it by using htpasswd command), I know how ssh works when two real OS accounts in two hosts are communicating, they exchange publish ssh keys; but how it works when using port 29418, and in gerrit server side no real OS user exist? Do you have good place introducing these knowledge? – LearnToDeath Oct 05 '16 at 17:06
  • Maby check this e-book "Learning Gerrit Code Review [eBook]" there is a lot of information ;) – Mateusz Wocka Oct 06 '16 at 11:37
  • Ok, thank you very much. Now I have solved it by installing gerrit a second time with a different user, not root. Though I still don't understand why it doesn't work before. I will read that book for more details. – LearnToDeath Oct 07 '16 at 02:24