Every time I try to deploy, it hits the NAT, attempts to connect to the instance, and gets killed because it doesn't have permission. Which I'm assuming means it didn't properly add the pem to the agent.
I'm currently specifying the key in my production config. I've also tried using a connection script on my machine via "pre-deploy-local": "~/ssh-script.sh" which also fails, despite working when I use it outside of PM2. I've also tried using "ssh_options": ["-A", "-i ~/.ssh/imakey.pem"] to no avail. No combination of any of these seems to actually use the pem file.
@Unitech
I'm currently trying to deploy to an EC2 instance sitting behind a NAT. My deployment chain looks like this:
add pem to ssh-agent -> connect to nat -> connect to instance -> pull changes -> build and restart
Every time I try to deploy, it hits the NAT, attempts to connect to the instance, and gets killed because it doesn't have permission. Which I'm assuming means it didn't properly add the pem to the agent.
I'm currently specifying the key in my production config. I've also tried using a connection script on my machine via
"pre-deploy-local": "~/ssh-script.sh"
which also fails, despite working when I use it outside of PM2. I've also tried using"ssh_options": ["-A", "-i ~/.ssh/imakey.pem"]
to no avail. No combination of any of these seems to actually use the pem file.Any ideas?