Closed Jigar3 closed 3 years ago
I was able to resolve this myself. For anybody else who gets stuck at this, I changed deploy.sh
to
#!/bin/sh
git config core.sshCommand 'ssh -i /home/ubuntu/.ssh/id_rsa' && \
git pull origin master && \
sudo docker-compose up --build -d
So, I have an Express server which I want to run on the EC2 instance.
Below is the
deploy.yml
file.Whenever I push any updates to my repo, the build gets successful.
When I check the response of the command by invoking
It always returns
It says I have some permission errors, but I have correctly setup the SSH keys, and I can successfully run the
/bin/sh deploy.sh
command and everything runs as expected without any errors.The
deploy.sh
file containsAny suggestions on what I might be doing wrong?