gpt4 book ai didi

ssh - 为 gitlab 配置 ssh 运行程序 ssh denied

转载 作者:行者123 更新时间:2023-12-04 19:30:00 26 4
gpt4 key购买 nike

我正在尝试为 Angular 项目设置一个简单的 gitlab CI

我刚刚在登台服务器上做了一个运行者。

这是/etc/gitlab-runner 中 config.toml 的摘录

  name = "awsTest10"
url = "http://gitlab.XXXXXXX/ci"
token = "XXXXXXXXXXXXXXXXXXXXX"
executor = "ssh"
[runners.ssh]
user = "root"
host = "ec2-XX-XX-XX-XX.eu-west-1.compute.amazonaws.com"
port = "22"
identity_file = "/root/.ssh/id_rsa"
[runners.cache]

我用 root 创建了一个 ssh key ,并在 gitlab deploys keys 中复制了公共(public)部分。我之前做了 ssh-add 。

当我使用运行者时,我得到以下结果:
Running with gitlab-ci-multi-runner 1.11.1 (a67a225)
on awsTest10 (e1ce142d)
Using SSH executor...
ERROR: Preparation failed: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
Will be retried in 3s ...
Using SSH executor...
ERROR: Preparation failed: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
Will be retried in 3s ...
Using SSH executor...
ERROR: Preparation failed: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
Will be retried in 3s ...
ERROR: Job failed (system failure): ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

感谢帮助

最佳答案

我有同样的问题。我将公钥附加到 ~/.ssh/authorized_keys并取消注释 AuthorizedKeysFile %h/.ssh/authorized_keys /etc/ssh/sshd_config 中的行文件。然后我重新启动了 ssh 服务,它对我有用。

关于ssh - 为 gitlab 配置 ssh 运行程序 ssh denied,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44599719/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com