Chcę użyć Grunta i rsync zainstalować kod z mojego komputera (Windows) na serwer (Linux).Grunt-rsync z klienta Windows zawiedzie
My Gruntfile.js
jest
module.exports = function(grunt) {
grunt.initConfig({
rsync: {
options: {
args: ['--verbose', '--chmod=777'],
exclude: ['*.git', 'node_modules'],
recursive: true
},
production: {
options: {
src: './bitzl.com',
dest: '/home/marcus/bitzl.com',
host: '[email protected]',
syncDest: true
}
}
}
});
grunt.loadNpmTasks('grunt-rsync');
}
Należy pamiętać, że używam homeDirectory z marcus
i chmod=777
tylko uproszczenie badań.
Running grunt rsync
zawiedzie:
Running "rsync:production" (rsync) task
rsyncing ./example.com >>> /home/marcus/bitzl.com
Shell command was: rsync ./bitzl.com [email protected]:/home/marcus/bitzl.com --rsh ssh --recursive --delete --delete-exc
luded --exclude=*.git --exclude=node_modules --verbose --chmod=777
ERROR
Error: rsync exited with code 12
Warning: Task "rsync:production" failed. Use --force to continue.
Error: Task "rsync:production" failed.
at Task.<anonymous> (D:\git\bitzl.com\node_modules\grunt\lib\util\task.js:200:15)
at null._onTimeout (D:\git\bitzl.com\node_modules\grunt\lib\util\task.js:236:33)
at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
Aborted due to warnings.
Jednak uruchamiając polecenie rsync z góry bez Grunt działa dobrze:
rsync ./bitzl.com [email protected]:/home/marcus/bitzl.com --rsh ssh --recursive --delete --delete-excluded --exclude=*.git --exclude=node_modules --verbose --chmod=777
rsync promts za hasłem mojego klucza publicznego (przez Grunt to robi” t) i synchronizuje się jak bryza.
Uwierzytelnianie na serwerze działa poprzez klucz publiczny (z hasłem). Uwierzytelnienie hasła również byłoby w porządku.
Domyślam się, że jakoś promt breaks i rsync kończy się niepowodzeniem z błędem protokołu (to jest exit code 12).
Czego mi brakuje, aby uzyskać polecenie-rsync działające w systemie Windows?
Aktualizacja:
Z VM Linux (Ubuntu 12.04 poprzez VirtualBox/Vagrant) działa jak na oczekiwałby.
możliwy duplikat błędu [błąd protokołu rsync cygwin] (http://stackoverflow.com/questions/4892125/cygwin-rsync-protocol-error) –