问题
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