ssh key verification during deployment
I've spent too much time debugging this, build goes fine, rysnc deployment doesn't work with hostkeyverification.
This for example works:
- ssh -vv -o UserKnownHostsFile=~/.ssh/known_hosts "${RSYNCUSER}"@hare.leap.se/
But with rsync:
- rsync -a -vvv --progress --human-readable --delete
--exclude-from '.gitignore'
--exclude .gitignore
--exclude .git
--exclude .ssh
-e "ssh -vv -o UserKnownHostsFile=~/.ssh/known_hosts -l web-hugo"
"$PWD"
hare.leap.se:/tmp/
Log output:
debug1: read_passphrase: can't open /dev/tty: No such device or address
Host key verification failed.
[sender] _exit_cleanup(code=12, file=io.c, line=235): about to call exit(255)
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3]
However
$ ls -l /dev/tty
crw-rw-rw- 1 root root 5, 0 Apr 15 09:30 /dev/tty
If no one comes with a nice solution I'm sticking to the -o StrictHostKeyChecking=no for now.