विफल रहता है मैं ग्रंट और rsync का उपयोग अपने कंप्यूटर (विंडोज) से सर्वर (लिनक्स) में कुछ कोड को तैनात करना चाहता हूं।विंडोज क्लाइंट से grunt-rsync
मेरे Gruntfile.js
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');
}
है कृपया ध्यान दें कि मैं marcus
और chmod=777
की homedirectory का उपयोग सिर्फ परीक्षण आसान बनाने के लिए।
grunt rsync
चल रहा है विफल रहता है:
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.
हालांकि, ऊपर से rsync आदेश चलाकर बिना ग्रंट ठीक काम करता है: मेरे सार्वजनिक कुंजी का पदबंध के लिए
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 (ग्रंट के माध्यम से यह नहीं करता है टी) और एक हवा की तरह syncs।
सर्वर पर प्रमाणीकरण सार्वजनिक कुंजी (पासफ्रेज़ के साथ) के माध्यम से काम करता है। पासवर्ड प्रमाणीकरण भी ठीक होगा।
मेरा अनुमान है कि किसी भी तरह से पासवर्ड प्रोम ब्रेक और rsync प्रोटोकॉल त्रुटि के साथ विफल रहता है (यह exit code 12 है)।
विंडोज़ पर काम कर रहे grunt-rsync पाने के लिए मुझे क्या याद आ रही है?
अद्यतन:
एक लिनक्स वी एम (Ubuntu 12.04 Virtualbox/Vagrant के माध्यम से) से यह की तरह पर उम्मीद करेंगे काम करता है।
[साइगविन आरएसआईएनसी प्रोटोकॉल त्रुटि] के संभावित डुप्लिकेट (http://stackoverflow.com/questions/4892125/cygwin-rsync-protocol-error) –