hudson无法访问git存储库

问题描述:

我正在尝试让hudson从远程存储库中拉出,我已经在hudson用户从/usr/lib/hudson/.ssh/id_rsa.pub到gitosis keydir之间建立了ssh信任关系(就像我已经已经为其他数百个用户完成了

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)

当我以hudson身份入场并奔跑

when I ssh in as hudson and run

git clone git @ gitserver:project

git clone git@gitserver:project

我知道

你不能通过!

You shall not pass!

输入密码:

哈德森使用者无法从gitosis克隆而其他任何使用者都能克隆吗?

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设置为/usr/lib/hudson

HUDSON_HOME is set to /usr/lib/hudson

尝试将git路径设置为git和/usr/bin/git

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

任何帮助表示赞赏! :)

any help appreciated! :)

在处理ssh时,此处最重要的一个环境变量是$HOME.
而且即使哈德森用户"确实有家,哈德森用户的"$HOME"也可能无法从哈德森进程中设置/得知.
请参阅"为Gerrit和Hudson创建SSH密钥"有关更多详细信息,并检查您在本地和远程端的权限.

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与ssh无关.