Describe the bug
when setting a host with a port in deployment.lua
return {
["myremote"] = {
host = "hostname:22250",
username = "foo",
mappings = {
{
["local"] = "/",
["remote"] = "/",
},
},
},
}
the host works as expected when operations are run through scp but they don't work using rsync.
The commands (based on rsync) lacking support are:
TransferDownload or TransferUpload when path is a dir
TransferDirDiff
How to reproduce
- set
host with syntax hostname:port
- run either
TransferDownload, TransferUpload on a dir or TransferDirDiff
Error shown:
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255)
Expected behavior
- diff the directory with the remote one and display the changed files in the quickfix
- sync the files
System
- OS: MacOS 13.5.2
- NVIM v0.11.3
- transfer.nvim commit: af75ad5
Solution
- I'm working on a pull request with a modified
remote_rsync_path() to extract port numbers from host strings
rsync doesn't support hostname:portnumber syntax, but it requires to define the port using extended options, i.e. -e "ssh -p {portnumer}"
- to avoid command execution issues with extended options, need to pass a string instead of a list to
vim.fn.jobstrart -> vim.fn.jobstart(table.concat(command, " "),{...})
Especially about the last point, do you think that could have some side effects?
Describe the bug
when setting a
hostwith aportindeployment.luathe host works as expected when operations are run through
scpbut they don't work usingrsync.The commands (based on rsync) lacking support are:
TransferDownloadorTransferUploadwhen path is a dirTransferDirDiffHow to reproduce
hostwith syntaxhostname:portTransferDownload,TransferUploadon a dir orTransferDirDiffError shown:
Expected behavior
System
Solution
remote_rsync_path()to extract port numbers from host stringsrsyncdoesn't supporthostname:portnumbersyntax, but it requires to define the port using extended options, i.e.-e "ssh -p {portnumer}"vim.fn.jobstrart->vim.fn.jobstart(table.concat(command, " "),{...})Especially about the last point, do you think that could have some side effects?