Answer the question
In order to leave comments, you need to log in
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,
}));
});
[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.
Answer the question
In order to leave comments, you need to log in
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 questionAsk a Question
731 491 924 answers to any question