title: Gulpfile, Rsync,RsyncWrapper, Rsync Exits with code 12
body: <p>Im trying to use gulp to handle my rysnc task from a local dev environment to a running vagrant machine. </p>
  
  <p>The gulp task is set up like this:</p>
  
  <pre><code>var rsync        = require('rsyncwrapper').rsync;
  var secrets      = require('./secrets.json');
  
  // ###Rsync
  // Ran from gulp
  gulp.task('deploy', function() {
    rsync({
      ssh: true,
      src: './website/',
      dest: secrets.servers.dev.rsyncDest,
      recursive: true,
      syncDest: true,
      exclude: ['node_modules'],
      args: ['--verbose'],
      privateKey: './.vagrant/machines/default/virtualbox/private_key',
      onStdout: function (data) { 
        console .log (data.toString ()); 
      } 
    },function (error,stdout,stderr,cmd) {
          if ( error ) {
              // failed
              console.log(error.message);
          } else {
              // success
              console.log("folder synced!");
          }
      });
  });
  </code></pre>
  
  <p>The secrets.json contains the path to my destination vagrant machine:</p>
  
  <pre><code>{
    "servers": {
      "dev": {
        "rsyncDest": "vagrant@192.168.2.101:/opt/webiste"
      }
    }
  }
  </code></pre>
  
  <p>The rest of my gulp file works without issue, a normal vagrant rsync also works to transfer the file across.</p>
  
  <p>However, when I run my task deploy, I simply get: Rsync Exited with code 12.</p>
  
  <p>After some googling I found that this means the protocol stream has failed but I am unsure as even where to begin trying to fix this issue. </p>
  
  <p>Any help would be greatly appreciated!</p>