Tomcat/Hudson can not connect to Github
I have used Tomcat as the container for Hudson, and had Git plugin for Hudson installed.
Now, when I try to make a build, the Hudson/Tomcat can not connect to Github. The log says: Host key verification failed.
It works fine when I use command line to clone project from Github repo.Seems like Tomcat can not access ssh key for Github private repo..
Could anyone give some in开发者_运维问答structions of how to solve this issue? Thanks in advance..
You have to check the following:
- You are using ssh keys of the user who ran hudson daemon. For example, if user=hudson, then you should log on as hudson and generate ssh keys
- You have loaded your public key to your server (github, assembla) from correct .ssh/id_rsa.pub file i.e. for the same user who ran hudson daemon
- You have added RSA fingerprint of your server to your .ssh/known_hosts file
What OS is Tomcat running on, and as which user? If it runs under a different user account than the one you're logging into, it won't find the SSH keys in your home folder.
If you are running tomcat on mac os x, it's probably using the hidden user _appserver. Generated keys should appear in /var/empty/.ssh. If you are not sure what user it is, go to the dir and do ls -al. (Would probably be in /Library/Tomcat or /usr/local/tomcat.)
精彩评论