hudson cannot access git repository

自闭症网瘾萝莉.ら 提交于 2020-01-15 12:46:08

问题


I am trying to get hudson to pull from a remote repository, I have set up an ssh trust relationship between the hudson user from /usr/lib/hudson/.ssh/id_rsa.pub to the gitosis keydir (like I have done for hundreds of other users)

when I ssh in as hudson and run

git clone git@gitserver:project

I get

You shall not pass!

Enter Password:

is there any reason the hudson user cannot clone from gitosis but every other user can?

I have tried with a fresh install of hudson as well.

HUDSON_HOME is set to /usr/lib/hudson

have tried git path as git and /usr/bin/git

any help appreciated! :)


回答1:


When dealing with ssh, the one environment variable which is important here is $HOME.
And the "$HOME" of the Hudson user might not be set/known from the Hudson process, even though that "Hudson user" does have a home.
See "Creating SSH keys for Gerrit and Hudson" for more details and check your permissions on both the local and the remote sides.

HUDSON_HOME isn't relevant for ssh.



来源:https://stackoverflow.com/questions/6076488/hudson-cannot-access-git-repository

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!