【问题标题】:Jenkins - Credentials - are they not used when checking items out of a private github repo?Jenkins - 凭证 - 从私人 github 存储库中检查项目时不使用它们吗?
【发布时间】:2017-03-10 01:24:11
【问题描述】:

我的印象是,要从私有 github 存储库中检查项目,您需要在 Jenkins 中设置凭据。

但是,当我删除 Credentials 时,Jenkins 仍然能够从私有 github 存储库中检查代码。

所以,我假设它使用ssh 键。对吗?

【问题讨论】:

    标签: git github jenkins ssh credentials


    【解决方案1】:

    这取决于你的 git 存储库的 url。如果它以 ssh 开头,它将尝试使用ssh。如果是 https/http 就是正常的 http 克隆。

    【讨论】:

      【解决方案2】:

      默认情况下,Git 插件使用命令行git 客户端,如果您没有在作业配置中指定任何其他凭据,它将尝试正常使用任何本地 SSH 密钥。

      但正如您所说,最好使用 Credentials 插件,因为这样您就不必手动确保在 Jenkins 可能运行构建的每台机器上都安装了正确的 SSH 私钥。

      【讨论】:

        猜你喜欢
        • 2011-07-09
        • 2023-02-03
        • 2021-08-03
        • 2014-11-30
        • 2017-06-15
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-04-20
        相关资源
        最近更新 更多