jenkins rsync for send script to server
Jenkins is a service account, it doesn't have a shell by design. It
is generally accepted that service accounts. shouldn't be able to log in
interactively.
To resolve "Jenkins Host key verification failed", do the following steps. I have used mercurial with jenkins.
1)Execute following commands on terminal
3) Disable prompt Yes/No Authenticity host
4)Go to --> cat /var/lib/jenkins/.ssh/id_rsa.pub
5)Copy key from id_rsa.pub to server production or you can use this script
https://denzfarid.blogspot.co.id/2016/12/automate-pushing-of-ssh-copy-id-to.html#
6) open jenkins dashboar , go to your project , cofigure, and in build -> add build step -> execute shell
source : http://stackoverflow.com/questions/15174194/jenkins-host-key-verification-failed
To resolve "Jenkins Host key verification failed", do the following steps. I have used mercurial with jenkins.
1)Execute following commands on terminal
sudo su -s /bin/bash jenkins2)Generate public private key using the following command:
ssh-keygen -N "" -f ~/.ssh/id_rsa -t rsa -b 4096or
ssh-keygen -N "" -f ~/.ssh/id_rsa -o -a 100 -t ed25519https://blog.g3rt.nl/upgrade-your-ssh-keys.html#multi-key-aware-ssh-client
3) Disable prompt Yes/No Authenticity host
echo -e "StrictHostKeyChecking no \nUserKnownHostsFile=/dev/null" > ~/.ssh/config
4)Go to --> cat /var/lib/jenkins/.ssh/id_rsa.pub
5)Copy key from id_rsa.pub to server production or you can use this script
https://denzfarid.blogspot.co.id/2016/12/automate-pushing-of-ssh-copy-id-to.html#
6) open jenkins dashboar , go to your project , cofigure, and in build -> add build step -> execute shell
rsync -e "ssh" -a -P -z --force --include=".htaccess" --include="uploads/" --exclude=".*" . user@production:/var/www/html
source : http://stackoverflow.com/questions/15174194/jenkins-host-key-verification-failed
Comments
Post a Comment