ubuntu - gitlab ssh runner 失败。怎么了?

标签 ubuntu ssh gitlab runner

我正在尝试使用 ssh runner 设置 gitlab ci/cd 管道。但是当我启动管道时,我有以下错误:
gitlab pipeline results
/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.


考虑到它尝试连接到 gitlab.com,你的 SSH 执行器失败是有道理的本身,并在那里运行一些东西:这肯定是不可能的,因为 GitLab 只会回答 ssh 查询以用于 Git 存储库操作,而不是用于随机用户脚本。
一个 GitLab runner旨在安装在用户 Controller 服务器上(如 GitHub webhook 会),我为了被 GitLab 作业调用。

关于ubuntu - gitlab ssh runner 失败。怎么了?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69136483/

相关文章:

linux - 使用 EC2 专用 AMI 的 Putty 出现 SSH 错误

git - 通过非标准 SSH 端口使用 Git

GitLab CI 构建失败,无法识别 git

ubuntu - Ubuntu 中通过 VMWare 的声音设备(Windows 7 主机)

ubuntu - 如何在 Ubuntu 12.04 LTS 上安装 Coderunner?

powershell - 使用System.Diagnostics.Process在标准输入上将y输入到Plink?

python - 通过Gitlab合并请求将参数传递给Jenkins

python - 无法启动 jupyter notebook

linux - 如何验证我的 cron 作业将在 AWS 上使用 Ubuntu 运行?

maven - 在容器中安装 Docker 供 GitLab CI 构建使用