Gitlab command executing on server where ( gitlab runner setup)

  • I’ve setup specific runner for my project at one machine - 10.0.0.*** ( It’s running showing green symbol )
  • I’ve added some SSH_PRIVATE_KEY and deploy keys ( My local machine private and public key where I want to deploy my code )
  • I;m trying to change directory ‘/var/www/html/test’ on my local server.
  • But its still trying to change the directory on server ( Where my runner is running )

Running with gitlab-ci-multi-runner 1.11.1 (a67a225)
on TAP (6efeaedd)
Using Shell executor…
Running on OSMPPDEV…
Fetching changes…
HEAD is now at bc235bb Modified YAML to deploy code on local machine ( 10.0.0.*** ).
Checking out bc235bb8 as sprint-1…
Skipping Git submodules setup
which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y ) /usr/bin/ssh-agent eval (ssh-agent -s) Agent pid 24497 ssh-add <(echo "SSH_PRIVATE_KEY") Identity added: /dev/fd/63 (/dev/fd/63) mkdir -p ~/.ssh
echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config ssh -T git@10.0.0.***
Welcome to GitLab, Anonymous!
cd /var/www/html/tap bash: line 60: cd: /var/www/html/tap: No such file or directory ERROR: Job failed: exit status 1 FYI - Present working directory its showing server pwd

  • Can we run multiple specific runners to the project ?

Could you please help me on this?

  • Can we setup runner on one machine, and deploy on another the machine ? yes right?

Any help? I believe its connecting to the machine ( where my gitlab runner setup),
there I’m trying to change directory “/var/www/html/tap”, but these files are not there,
Actually it’s present on my machine ( Where I want to deploy the code), so how it will deploy on my local machine?

I added my local machine private key as SSH_PRIVATE_KEY and local machine public key as deploy keys.
Can’t it connect to my local machine, could you please help me how can I do this?
I’m trying to add one more runner to this project which is running on my local machine itself, but its saying as inactive.
Could anyone please help me on this?

Have you considered setting up the runner on the same machine that you want to deploy the code on? It could make what you are trying to do much simpler.

I’m trying to do the same and avoid the ssh key process which is really annoying to set up. Do you have any tutorial? the ones I tried didn’t work