PM2(Node.js)部署 - 主机密钥验证失败

3

当我试图进行部署时,出现了错误

主机密钥验证失败。 致命错误:远程终端意外中止 错误:无法获取原始数据

获取失败

部署失败

我的存储库位于Bitbucket上。 所有的ssh-keygen都已添加到Bitbucket上

有什么想法吗?

谢谢

1个回答

0
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'
}

连接时必须使用您的用户提供ssh,例如上面是ubuntu用户,而不是在ecosystem.config.js上的root用户。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接