【问题标题】:Can't configure jenkins with git无法使用 git 配置 jenkins
【发布时间】:2017-10-05 12:09:26
【问题描述】:

我按照这个指南 https://github.com/jenkinsci/gitlab-plugin/wiki/Setup-Example 来集成 Jenkins-Gitlab-Git。

我在同一个 ubuntu 服务器上安装了 Jenkins、Git、Gitlab。我用 Jenkins 用户创建了 id_rsa.pub。然后添加到 gitlab 和 jenkins 中。

当我尝试时

git ls-remote -h git@10.0.5.12:Intranet/Vardiya.git HEAD

ubuntu 命令行没有错误。

在 Jenkins 项目源配置中,我无法传递该错误。

无论如何,我会跳过错误并在 Gitlab 上为 Jenkins 作业创建一个 webhook。测试后 -> 任何事件都会出现此错误。

请帮忙!

【问题讨论】:

    标签: git jenkins gitlab


    【解决方案1】:

    看起来您在 Jenkins 的 私钥 字段中输入了您的 公钥

    私钥应该在一个名为id_rsa的文件中,而不是id_rsa.pub

    【讨论】:

    • 很好,谢谢!我通过了第一个错误。但仍然得到 Hook 执行 ... 最后一个
    • 我不知道,抱歉
    猜你喜欢
    • 2016-09-13
    • 2016-01-24
    • 2021-12-19
    • 2013-05-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-09-24
    • 2020-01-14
    相关资源
    最近更新 更多