【问题标题】:Hudson(Jenkins) and remote git repository get permission deniedHudson(Jenkins) 和远程 git 存储库获得权限被拒绝
【发布时间】:2011-06-13 09:46:11
【问题描述】:

我已经设置了 hudson 从我的远程 git 存储库中签出,但我得到了

**Permission denied (publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive).**

我的 git 存储库使用 gitosis 并在我通过命令行克隆时工作。 Hudson 以同一用户身份运行

这是日志的较大部分,其中包含已编辑的主机名和目录

Checkout:workspace / /Users/me/.hudson/jobs/HudsonJob/workspace - hudson.remoting.LocalChannel@363adfb4
Cloning the remote Git repository
Cloning repository origin
ERROR: Error cloning remote repo 'origin' : Could not clone gitosis@myserver:myproject
ERROR: Cause: Error performing command: /opt/local/bin/git clone -o origin gitosis@myserver:myproject /Users/me/.hudson/jobs/HudsonJob/workspace
Command "/opt/local/bin/git clone -o origin gitosis@myserver:myproject /Users/me/.hudson/jobs/HudsonJob/workspace" returned status code 128: Cloning into /Users/me/.hudson/jobs/HudsonJob/workspace...
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive).
fatal: The remote end hung up unexpectedly

我还尝试从命令行运行以下命令

/opt/local/bin/git clone -o origin gitosis@myserver:myproject /Users/me/.hudson/jobs/HudsonJob/workspace

它可以工作,但我必须指定密码才能工作。

我的猜测是 hudson 构建失败,因为它必须提示输入密码。 通常我猜想将我的公钥添加到 .ssh/authorized 密钥可以完成这项工作,但 gitosis 的授权密钥会使用一些额外的命令自动生成该公钥。

所以我想知道如何在不输入密码的情况下允许 hudson 访问?

【问题讨论】:

标签: git ssh hudson jenkins gitosis


【解决方案1】:

首先,我建议使用 gitolite,因为 gitosis 不再活跃。

使用不需要密码的密钥。

【讨论】:

    猜你喜欢
    • 2016-05-18
    • 2014-11-28
    • 2021-05-01
    • 2013-02-27
    • 2014-02-10
    • 2012-11-20
    • 2018-08-24
    • 1970-01-01
    • 2018-05-08
    相关资源
    最近更新 更多