I'm trying to set up a simple gitlab CI for an angular project
I just made a runner on staging server.
Here is an extract of config.toml in /etc/gitlab-runner
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]
I created a ssh key with root and I copied the public part in gitlab deploys keys. I made ssh-add before.
When I use the runner I have the following result :
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
Thanks for help
I had the same problem. I appended public key to ~/.ssh/authorized_keys
and uncomment AuthorizedKeysFile %h/.ssh/authorized_keys
line in the /etc/ssh/sshd_config
file. Then i restarted ssh service and it works for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With