pm2部署项目报错

购买的是阿里云ecs服务器,使用pm2部署项目时报错了
仓库使用的码云
运行pm2 deploy ecosystem.json production setup 命令 报错

Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
  failed to clone
Deploy failed

尝试过在服务器输入
ssh-keyscan -t rsa gitee.com >> ~/.ssh/known_hosts
可是依然解决不了
有人知道是什么原因吗?

阅读 4.2k
2 个回答

我在阿里云控制台的ssh密钥对里添加了服务器的公钥,结果就可以了

告诉你是验证失败了,如果使用公钥的话,你把阿里云的公钥加到码云上了么?

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题