add ssh-key to rsync

This commit is contained in:
LinuxSquare 2024-04-20 20:49:58 +02:00
parent 70a82fc0b0
commit 0bcf1973fa

View file

@ -162,7 +162,7 @@ function publish_repo() {
local ssh_priv_key_path="$(jq -r '.ssh_priv_key_path' $CONFIG)"
message_blue_double_colon "Publishing files to remote webserver: ${remote_user}@${remote_server}:${remote_path}/"
rsync -a --delete --progress --rsync-path="mkdir -p ${remote_path} && rsync" "${REPO_DIR}/" "${remote_user}@${remote_server}:${remote_path}"
rsync -a --delete -e "ssh -i ${ssh_priv_key_path}" --progress --rsync-path="mkdir -p ${remote_path} && rsync" "${REPO_DIR}/" "${remote_user}@${remote_server}:${remote_path}"
}
##