Advertisement
Guest User

Untitled

a guest
Jul 17th, 2017
465
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. stages:
  2. - deploy
  3.  
  4. before_script:
  5. - npm i
  6. - npm run build
  7.  
  8. job_deploy:
  9. stage: deploy
  10. script:
  11. - ssh-keygen -t rsa -b 4096 -C '' -f ~/.ssh/deploy_rsa
  12. - ssh-keyscan -H 8.8.8.8 >> ~/.ssh/known_hosts
  13. - ssh-copy-id -i ~/.ssh/deploy_rsa.pub $SERVER_USER@8.8.8.8
  14. - rsync -avuz $CI_PROJECT_DIR/dist/ $SERVER_USER@8.8.8.8:/var/wwww/example.com
  15. only:
  16. - master
  17.  
  18. /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
  19. /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
  20. Permission denied, please try again.
  21. Permission denied, please try again.
  22. Permission denied (publickey,password).
  23.  
  24. rsync -avuz -e 'ssh -i ~/.ssh/deploy_rsa.pub' $CI_PROJECT_DIR/dist/ $SERVER_USER@8.8.8.8:/var/wwww/example.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement