Hey, thank you very much for very detailed example. I did it successfully and I found some point
.gitlab-ci.yml
chmod
stage: deploy image: kroniak/ssh-client before_script: - echo "deploying app" script: - echo "$SSH_PRIVATE_KEY" | tr -d '\r' > key.pem - chmod 400 key.pem - ssh -o StrictHostKeyChecking=no -i key.pem root@$PROD_SERVER_IP ... - ssh -o StrictHostKeyChecking=no -i key.pem root@$PROD_SERVER_IP ... - ssh -o StrictHostKeyChecking=no -i key.pem root@$PROD_SERVER_IP ...
I used EC2 Ubuntu 18.04 Server.
Thank you again <3
Please share with us the updated code
I just got tricked with that error. Thanks for the fix.🥳
You can set your private key gitlab variable as file and then you don't have to create key.pem file
oh! sorry for that mistake bro! 😔 but thanks for sharing your solution this will help other devs! 💪 and thank you for reading bro! 👍
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey, thank you very much for very detailed example.
I did it successfully and I found some point
.gitlab-ci.yml
file, at deploy state, port should be 3005chmod
, I've replaced by this lineI used EC2 Ubuntu 18.04 Server.
Thank you again <3
Please share with us the updated code
I just got tricked with that error. Thanks for the fix.🥳
You can set your private key gitlab variable as file and then you don't have to create key.pem file
oh! sorry for that mistake bro! 😔
but thanks for sharing your solution this will help other devs! 💪
and thank you for reading bro! 👍