【问题标题】:gitlab ssh runner fails. What's wrong?gitlab ssh runner 失败。怎么了?
【发布时间】:2021-11-07 04:47:51
【问题描述】:

我正在尝试使用 ssh 运行器设置 gitlab ci/cd 管道。但是当我启动管道时,我有以下错误:

/etc/gitlab-runner/config.toml 如下:

concurrent = 1
check_interval = 0
log_level = "debug"

[session_server]
  session_timeout = 1800

[[runners]]
  name = "runner"
  url = "https://gitlab.com/"
  token = "XXXXXXXXXX"
  executor = "ssh"
  [runners.ssh]
    host = "gitlab.com"
    port = "22"
    user = "gitlab-runner"
    identity_file = "/home/gitlab-runner/.ssh/id_rsa"
  [runners.custom_build_dir]
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]
    [runners.cache.azure]

Runner 安装在 Ubuntu 20.04 下。我将不胜感激任何建议!提前谢谢你!

【问题讨论】:

    标签: ubuntu ssh gitlab runner


    【解决方案1】:

    SSH executor 是:

    它使 GitLab Runner 连接到外部服务器并在那里运行构建。
    我们有一些组织使用此执行器的成功案例,但通常我们建议使用其他类型之一。

    考虑到它会尝试连接到gitlab.com 本身并在那里运行某些东西,你的 SSH 执行程序失败是有道理的:这肯定是不可能的,因为 GitLab 只会回答 ssh 查询以用于 Git 存储库操作,而不是随机用户脚本。

    GitLab runner 旨在安装在用户控制器服务器上,(就像 GitHub webhook 一样),我为了被 GitLab 作业调用。

    【讨论】:

    • 非常感谢!
    猜你喜欢
    • 2017-05-07
    • 1970-01-01
    • 2015-07-17
    • 1970-01-01
    • 1970-01-01
    • 2012-08-30
    • 2018-12-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多