开发者

Tomcat/Hudson can not connect to Github

开发者 https://www.devze.com 2023-01-27 03:04 出处:网络
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 verifica

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:

  1. 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
  2. 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
  3. 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.)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号