gitlab ssh runner 失败。怎么了?

gitlab ssh runner fails. What's wrong?

我正在尝试使用 ssh runner 设置 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 下。我将不胜感激任何建议!提前谢谢你!

SSH executor是:

It makes GitLab Runner connect to an external server and runs the builds there.
We have some success stories from organizations using this executor, but usually we recommend using one of the other types.

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

A GitLab runner is meant to be installed on a user-controller server, (like a GitHub webhook would), i order to be call by a GitLab job.