Quantcast
Channel: Active questions tagged amazon-ec2 - Stack Overflow
Viewing all articles
Browse latest Browse all 29243

Can not connect to EC2 instace using gitlab CI/CD pipeline

$
0
0

There are two pipelines in gitlab --> build & deploy

In deploy pipeline I want to copy dist folder into my ec2 directory that's why I want to ssh into my ec2.

command I have put in yml file & settled variables also :

$ ssh -tt -i $Server_pem ubuntu@Server_IP

but when deploy pipeline it shows error :

ssh: Could not resolve hostname server_ip: Name or service not known

Ec2 Instance Details :

Ubuntu AMIUsing Public DNS / IP : ec2-XX-XXX-XX-XX.ap-south-1.compute.amazonaws.com Instance can be accessed from outside ( configured security group for this)

GitLab Details :

I'm using Gitlab shared runners for this (Personal account) &Added SHA (RSA) key in Server_pem file in variables for connection EC2

help me to solve this issue and if any other way I can copy my build please let me know.

Thank you in advance :)


Viewing all articles
Browse latest Browse all 29243

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>