Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

farshadf's avatar

running gitlab cicd for laravel

hi i wanted to make cicd for my laravel app and i simply want to when ever i push to some specific branch or accept merge request on it all 3 servers that i have automatically pull the code . so what i have done so far . i have installed gitlab runner and i added this file to my git :

stages:
  - deploy

deploy:
  stage: deploy
  script:
    - cd /home/wishato/code
    - sudo git pull origin stagging
  tags:
    - stagging

when this runs i get this error :

Running with gitlab-runner 12.9.0 (4c96e5ad)
   on farshad ci cd 8vEm7vWq
Preparing the "ssh" executor
00:09
 Using SSH executor...
 ERROR: Preparation failed: ssh command Connect() error: getSSHAuthMethods error: open /home/user/.ssh/id_rsa: no such file or directory
 Will be retried in 3s ...
 Using SSH executor...
 ERROR: Preparation failed: ssh command Connect() error: getSSHAuthMethods error: open /home/user/.ssh/id_rsa: no such file or directory
 Will be retried in 3s ...
 Using SSH executor...
 ERROR: Preparation failed: ssh command Connect() error: getSSHAuthMethods error: open /home/user/.ssh/id_rsa: no such file or directory
 Will be retried in 3s ...
 ERROR: Job failed (system failure): ssh command Connect() error: getSSHAuthMethods error: open /home/user/.ssh/id_rsa: no such file or directory

0 likes
3 replies
domthomas-dev's avatar

If you use sudo, it try to use id_rsa for this user non ? /home/user/.ssh/id_rsa: no such file or directory

mbahamondes's avatar

Hello friend, could you solve your problem? I am having the same one and I can not find information on how to solve it

Please or to participate in this conversation.