0

I installed rsync 3.2.4 with cygwin in windows11 with the path C:\Cygwin\bin\rsync.exe. When I directly run rsync in windows terminal, I got the error code 12. enter image description here

But this command runs normally when executed in cygwin terminal. Are there any other configuration should I do to use rsync outside of cygwin terminal?

3
  • AFAIK cygwin programs (as opposed to mingw builds) aren't exactly native Windows programs and aren't really supposed to be run outside cygwin terminal / shell.
    – Tom Yan
    Commented Aug 2, 2022 at 1:16
  • Thanks for your reply, I just solve this problem by specifying the path of ssh with -e
    – Whisht
    Commented Aug 2, 2022 at 1:42
  • You didn't post the command you were executing and what shell you were using when running the command. Note that there is no such thing as a "Cygwin terminal". You can run a shell from Cygwin (bash, zsh, ...) inside the normal Windows terminal. However, you can also install with Cygwin mintty, which is a terminal that is optimized for Cygwin and much more powerful than the one which comes with Windows. Commented Mar 18 at 12:10

1 Answer 1

3

I just found why the error happend. In windows terminal, rsync call windows openssh when syncing with remote server, which is incompatible with cygwin rsync. Just specify the cygwin ssh path, It could run normally. Like this

C:\Cygwin\bin\rsync.exe -e "C:\Cygwin\bin\ssh.exe" source_file destination.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .