N
N
Nazariy Lugovoy2018-11-05 13:03:51
SSH
Nazariy Lugovoy, 2018-11-05 13:03:51

Setting up gulp-rsync. How to fix gulp-rsync: bash: rsync: command not found?

Help with gulp-rsync settings. The task is to transfer files from the test_rsync directory (gsmrepair.loc/test_rsync) of the local project to the hosting to the temp directory (gsmrepair.co.ua/public_html/temp)
Gulp.js settings:

gulp.task('deploy', function() {
  return gulp.src('test_rsync/**')
    .pipe(rsync({
      root: 'test_rsync/',
      hostname: '[email protected]',
      destination: 'home/gsmrepairco/public_html/temp',
      archive: true,
      silent: false,
      compress: true,
    }));
});

Project
5be01225dc81a845379846.jpeg
structure: Hosting structure when connecting SSH
5be012c8ba2ac584279937.jpeg
with the gulp deploy command, I get the following result:
[email protected]:/mnt/c/OSPanel/domains/gsmrepair.loc$ gulp deploy
[11:55:30] Using gulpfile /mnt/c/OSPanel/domains/gsmrepair.loc/gulpfile.js
[11:55:31] Starting 'deploy'...
[11:55:31] gulp-rsync: Starting rsync to [email protected]:public_html/temp...
[11:55:35] gulp-rsync: bash: rsync: command not found
[11:55:35] gulp-rsync:  [11:55:35] gulp-rsync: rsync: connection unexpectedly closed (0 bytes received so far) [sender]
[11:55:35] gulp-rsync: rsync error: remote command not found (code 127) at io.c(235) [sender=3.1.2]
[11:55:35] gulp-rsync:  [11:55:35] 'deploy' errored after 3.15 s
[11:55:35] Error in plugin 'gulp-rsync'
Message:
    Error: rsync exited with code 127
    at ChildProcess.<anonymous> (/mnt/c/OSPanel/domains/gsmrepair.loc/node_modules/gulp-rsync/rsync.js:110:17)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:962:16)
    at Socket.stream.socket.on (internal/child_process.js:381:11)
    at Socket.emit (events.js:182:13)
    at Pipe._handle.close (net.js:606:12)
[11:55:35] gulp-rsync: Completed rsync.

Win 10 system, developer mode, Ubuntu connected, node.js installed in Linux, gulp globally, commands are executed via bash

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nazariy Lugovoi, 2018-11-05
@Nazariy

Issue resolved.
As suggested by Saboteur and Dmitry Shitskov
The problem turned out to be that rsync must be installed on both sides of the data transfer. In my case, the problem was in the hosting.
Thanks a lot for your help!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question