PM2 (Node.js) deploy - host key validation failed

When I try to deploy I have an error

Host key verification failed. fatal: the remote end hangs up unexpectedly error: Failed to get source code

bad sampling

Deployment failed

My repo is located on Bitbucket. All ssh-keygen are added to Bitbucket

Any ideas?

thank

+3


source to share


1 answer


production: {
        user: 'ubuntu',
        key: '~/.ssh/node_ec2.pem',
        host: 'ec2-52-221-188-28.ap-southeast-1.compute.amazonaws.com',
        ref: 'origin/master',
        repo: 'git@gitlab.com:telkomdev/belajarcoding-apis.git',
        path: '/home/ubuntu',
        'post-deploy': 'npm install && pm2 startOrRestart 
ecosystem.config.js'
}

      



You have to specify ssh for your user when connecting, for example above is the ubuntu user and not the root system.config.js user .

0


source







All Articles