Gitlab CI, ssh runner -


when try create ssh runner in deploy console have error:

running gitlab-ci-multi-runner 1.7.1 (f896af7) using ssh executor... error: preparation failed: open ~/.ssh/id_rsa.pub: no such file or directory retried in 3s ... using ssh executor... error: preparation failed: open ~/.ssh/id_rsa.pub: no such file or directory retried in 3s ... using ssh executor... error: preparation failed: open ~/.ssh/id_rsa.pub: no such file or directory retried in 3s ... error: build failed (system failure): open ~/.ssh/id_rsa.pub: no such file or directory 

on server created ssh key, , key in directory ~/.ssh/id_rsa.pub. .gitlab-ci.yml file:

stages: - deploy before_script:     - whoami mate-finder:   stage: deploy   script:     - sudo apt-get update -qy     - sudo apt-get install -y nodejs     - sudo npm install     - sudo ng build     - sudo ng serve 

how can deploy application on server? how must configure runner on server, when want deploy angular2 application on it?

you need check, config.toml placed. can search.

find / -name 'config.toml'

if result

/etc/gitlab-runner/config.toml

you running runner root. , need specify full path /root/.ssh/id_rsa.

if no - running under other user , you'll need specify directory /home/user/.ssh/id_rsa.

to find out user - register shell executor , run pwd or whoami


i believe gitlab-runner if not root.


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -