vscode-rsync
vscode-rsync copied to clipboard
Failed to exec ssh -p 1234
I am following the extension's guide, but seems like the extension does not recognize or uses incorrectly the shell option specified in the user settings.
Take a look at my (user) settings:
"sync-rsync.showProgress": true,
"sync-rsync.exclude": [
".git",
".vscode"
],
"sync-rsync.shell": "ssh -p 1234",
"sync-rsync.sites": [
{
"remotePath": "[email protected]:/home/user/src/project1"
},
{
"remotePath": "[email protected]:/home/user/src/project2"
}
]
Tried /usr/bin/ssh instead of ssh which didn't help. Here's the extension output when I run the sync command from the command palette:
rsync -rlptzv --progress --rsh="/usr/bin/ssh -p 1234" --exclude=.git --exclude=.vscode /Users/mhd/src/project1/ [email protected]:/home/user/src/project1/
rsync: Failed to exec /usr/bin/ssh -p 1234: No such file or directory (2)
rsync error: error in IPC code (code 14) at /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-54.120.1/rsync/pipe.c(86) [sender=2.6.9]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-54.120.1/rsync/io.c(453) [sender=2.6.9]
I hit the same issue -- taking the exact command and running it in the shell works without issue.
Looks to be the same issue as https://github.com/thisboyiscrazy/vscode-rsync/issues/113 which was resolved. I was able to get this working (on Mac) by adding sync-rsync.executableShell=/bin/bash
.
Here's the full settings:
{
...
"sync-rsync.shell": "ssh -o=ClearAllForwardings=yes",
"sync-rsync.options": [
["exclude-from", ".gitignore"],
],
"sync-rsync.executable": "/usr/local/bin/rsync",
"sync-rsync.executableShell": "/bin/bash"
}