I’m having something of an issue attempting to configure GitLab CI to interact with the GitLab repository.
I am receiving the following error whenever the gitlab-ci-multi-runner successfully polls the project and detects pending builds:
Using SSH executor... ERROR: Preparation failed: ssh: handshake failed: ssh: unable to authenticate, attempted methods [password publickey none], no supported methods remain
I am using v1.11.1 of the gitlab-ci-multi-runner on an internal server and the gitlab repository is similarly hosted internally. The gitlab project has been configured with the multi runner servers public ssh key as a deploy key, and a runner registered on the multi runner server with the following configuration:
concurrent = 1 check_interval = 0 [[runners]] name = "CITest Runner" url = "http://XXX.XXX.XX.XXX/ci" token = "XXXXXXXXXXXXXXXXXXXXXXXXXX" executor = "ssh" [runners.ssh] user = "CITest" host = "XXX.XXX.XX.XXX" port = "XX" identity_file = "/home/CITest/.ssh/id_rsa" [runners.cache]
While on the multi runner server, I am able to successfully clone the code from the repository via SSH, but any attempt by the multi runner to connect fails with the earlier mentioned error output.
I have even gone as far as to follow Toch’s answer on this StackOverflow link which involves passing the ssh private key to the box via an environment variable and registering it with the ssh agent through gitlab-ci.yml commands: http://stackoverflow.com/questions/25689231/getting-gitlab-ci-to-clone-private-repositories
Any assistance in diagnosing this issue would be greatly appreciated.