Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am attempting to configure google's 'Gerrit' code review web app on a Windows server 2008 virtual machine on our internal network.

We are using Apache Tomcat (6.0.36) to host the web app and have deployed the gerrit.war to tomcats webapp folder, setup the context.xml, web.xml etc for the web app correctly i believe.

However when i startup Tomcat using the $CATALINA_HOME/bin/startup.bat i get the following message in the tomcat logs:


*Dec 07, 2012 1:03:54 PM org.apache.catalina.core.StandardContext listenerStart

SEVERE: Exception sending context initialized event to listener instance of class >com.google.gerrit.httpd.WebAppInitializer com.google.inject.CreationException: Guice creation errors:*

1) No SSH keys under C:\Gerrit\config\etc while locating com.google.gerrit.sshd.HostKeyProvider at com.google.gerrit.sshd.SshModule.configure(SshModule.java:90)


I have created a is_rsa.pub SSH key and placed it in the specified directory to no avail. I have been googling this for about a week now and can't seem to find any information about the file or format it is expecting... documentation on setting gerrit up on windows seems hard to come by!

Can anyone provide useful information about how to correctly configure a host SSH key in this context?

share|improve this question
    
No prior experience with Gerrit, however does this link help your case? - serverfault.com/questions/383573/… –  ServerFaulter Dec 10 '12 at 6:44
    
@serverfaulter - yes i have come across this useful post and have been using it as a guide during the setup however the issue regarding the ssh key setup for the server isn't covered. –  hotpotato Dec 10 '12 at 9:47

2 Answers 2

I know next to nothing about Windows - On a *NIX environment a simple reason for ssh auth failure has to do with permissions on the file. I make sure it is owned by the 'whoami' user and is 'chmod 600' - that is the file istself is rw by the owner only.

Some information about how you generated the ssh key might also lead to an answer. Did you use Putty's keygen?

yrs

Michael

share|improve this answer
up vote 0 down vote accepted

I have just figured this out. The problem was not with authentication as such, i didn't get to the client access stage, i have been struggling to configure the server side ssh key to be used for subsequent client authentication.

It seems gerrit is looking for the server side ssh key file to be named 'ssh_host_key' in the config/etc folder not 'id_rsa.pub' which is the original name that the ssh-keygen program generates for the key. I don't know if this is a general server side ssh host key configuration but this seems to work for me.

I can now run the Gerrit web app successfully and can now continue configuring the client side ssh keys/accounts for client access.

Thanks for the posts/comments

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.