pm2 deploy with ssh

1. login remote server without password

ssh-copy-id  name@server.com

2.generate ssh key on server

ssh-keygen - t rsa

3. copy the server ssh key to the git deploy key

4. add gitlab to the know host

ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts

原文地址:https://www.cnblogs.com/ybleeho/p/9941971.html