Closed valan closed 10 years ago
Will look into it, I don't have a windows machine. So a pull request would speed this up.
Sent with AquaMail for Android http://www.aqua-mail.com
On May 2, 2014 4:07:23 PM valan notifications@github.com wrote:
I think this might be a directory separator thing.
in gulpfile:
gulp.task('deploy-sftp', function() { return gulp.src('./deploy.zip') .pipe(sftp({ host: "XXXXXX", remotePath: "/var/www/html", auth: 'stage' })); });
in .ftppass:
{ "stage": { "user": "ec2-user", "key": "C:/Dropbox/.ssh/id_rsa" } }
result on server: new file in /home/ec2-user with the filename: "\var\www\html\deploy.zip" (backslashes are part of the filename) 0 bytes
Reply to this email directly or view it on GitHub: https://github.com/gtg092x/gulp-sftp/issues/2
Wanted to ping this for regression reasons. I made some major directory management changes, if any issues pop up with directories on Windows, feel free to reopen this issue. I will not have a windows machine in my possession until next month.
yeah I'm running into some issues with 0.0.11 now
here's my sftp block:
gulp.task('deploy-sftp', ['deploy-zip'], function() {
var config = JSON.parse(fs.readFileSync('./.ftppass').toString());
return gulp.src('./node_modules/deploy.zip')
.pipe(sftp({
host: config.stage.host,
remotePath: config.stage.uploadPath,
auth: 'stage'
}));
});
I just put the zip file into node_modules because it's already ignored on my dropbox and I don't want it to start uploading via dropbox while I'm trying to upload via gulp
upload path is set to "/home/ec2-user" and that's where it would put deploy.zip in 0.0.6
here's what I get now:
[gulp] SFTP error or directory exists: Error: No such file home/ec2-user/node_modules
events.js:72
throw er; // Unhandled 'error' event
^
Error: No such file
at SFTP._parse (C:\Dropbox\work\protobox\web\cookpanion\node_modules\gulp-sftp\node_modules\ssh2\lib\SFTP\SFTPv3.js:986:23)
at ChannelStream.<anonymous> (C:\Dropbox\work\protobox\web\cookpanion\node_modules\gulp-sftp\node_modules\ssh2\lib\SFTP\SFTPv3.js:49:12)
at ChannelStream.EventEmitter.emit [as _emit] (events.js:95:17)
at ChannelStream.emit (C:\Dropbox\work\protobox\web\cookpanion\node_modules\gulp-sftp\node_modules\ssh2\lib\Channel.js:613:12)
at Parser.<anonymous> (C:\Dropbox\work\protobox\web\cookpanion\node_modules\gulp-sftp\node_modules\ssh2\lib\Channel.js:95:20)
at Parser.EventEmitter.emit (events.js:95:17)
at Parser.parsePacket (C:\Dropbox\work\protobox\web\cookpanion\node_modules\gulp-sftp\node_modules\ssh2\lib\Parser.js:596:12)
at Parser.execute (C:\Dropbox\work\protobox\web\cookpanion\node_modules\gulp-sftp\node_modules\ssh2\lib\Parser.js:249:14)
at Socket.<anonymous> (C:\Dropbox\work\protobox\web\cookpanion\node_modules\gulp-sftp\node_modules\ssh2\lib\Connection.js:515:18)
at Socket.EventEmitter.emit (events.js:95:17)
I tried adding {base: "./node_modules"} to the source file stream, didn't have an effect
when I tried saving and uploading the zip in root instead of node_modules, I got a 0 byte file in the right place on the server, and gulp hangs on
[gulp] SFTP :: SFTP session closed
Thanks for your patience here, I'll probably need your help addressing this. I'll see if there's any gotchyas staring me in the face.
Sent with AquaMail for Android http://www.aqua-mail.com
On May 23, 2014 1:08:19 PM valan notifications@github.com wrote:
yeah I'm running into some issues with 0.0.11 now
here's my sftp block:
gulp.task('deploy-sftp', ['deploy-zip'], function() { var config = JSON.parse(fs.readFileSync('./.ftppass').toString()); return gulp.src('./node_modules/deploy.zip') .pipe(sftp({ host: config.stage.host, remotePath: config.stage.uploadPath, auth: 'stage' })); });
I just put the zip file into node_modules because it's already ignored on my dropbox and I don't want it to start uploading via dropbox while I'm trying to upload via gulp
upload path is set to "/home/ec2-user" and that's where it would put deploy.zip in 0.0.6
here's what I get now:
[gulp] SFTP error or directory exists: Error: No such file home/ec2-user/node_modules events.js:72 throw er; // Unhandled 'error' event ^ Error: No such file at SFTP._parse (C:\Dropbox\work\protobox\web\cookpanion\node_modules\gulp-sftp\node_modules\ssh2\lib\SFTP\SFTPv3.js:986:23) at ChannelStream.<anonymous> (C:\Dropbox\work\protobox\web\cookpanion\node_modules\gulp-sftp\node_modules\ssh2\lib\SFTP\SFTPv3.js:49:12) at ChannelStream.EventEmitter.emit [as _emit] (events.js:95:17) at ChannelStream.emit (C:\Dropbox\work\protobox\web\cookpanion\node_modules\gulp-sftp\node_modules\ssh2\lib\Channel.js:613:12) at Parser.<anonymous> (C:\Dropbox\work\protobox\web\cookpanion\node_modules\gulp-sftp\node_modules\ssh2\lib\Channel.js:95:20) at Parser.EventEmitter.emit (events.js:95:17) at Parser.parsePacket (C:\Dropbox\work\protobox\web\cookpanion\node_modules\gulp-sftp\node_modules\ssh2\lib\Parser.js:596:12) at Parser.execute (C:\Dropbox\work\protobox\web\cookpanion\node_modules\gulp-sftp\node_modules\ssh2\lib\Parser.js:249:14) at Socket.<anonymous> (C:\Dropbox\work\protobox\web\cookpanion\node_modules\gulp-sftp\node_modules\ssh2\lib\Connection.js:515:18) at Socket.EventEmitter.emit (events.js:95:17)
I tried adding {base: "./node_modules"} to the source file stream, didn't have an effect
when I tried saving and uploading the zip in root instead of node_modules, I got a 0 byte file in the right place on the server, and gulp hangs on
[gulp] SFTP :: SFTP session closed
Reply to this email directly or view it on GitHub: https://github.com/gtg092x/gulp-sftp/issues/2#issuecomment-44054662
My errors are similar, but after some experimenting i realized that:
If i set remotePath as 'example-folder/', it's works fine and uploads the files even if i add 'some-folder/**' so Gulp will upload all my files in the selected folder recursively. This is cool! However if i set remotePath as 'example-folder/subfolder' than got similar error than above.
I was having this issue in Mac OS X (Yosemite). So it's not just a windows thing. The problem got solved after I remove trailing /
character from remotePath
.
I think this might be a directory separator thing.
in gulpfile:
in .ftppass:
result on server: new file in /home/ec2-user with the filename: "\var\www\html\deploy.zip" (backslashes are part of the filename) 0 bytes