Giter VIP home page Giter VIP logo

Comments (6)

gtg092x avatar gtg092x commented on July 25, 2024

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 [email protected] 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:
#2

from gulp-sftp.

gtg092x avatar gtg092x commented on July 25, 2024

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.

from gulp-sftp.

valan avatar valan commented on July 25, 2024

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

from gulp-sftp.

gtg092x avatar gtg092x commented on July 25, 2024

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 [email protected] 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:
#2 (comment)

from gulp-sftp.

zoltanradics avatar zoltanradics commented on July 25, 2024

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.

from gulp-sftp.

kishu27 avatar kishu27 commented on July 25, 2024

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 .

from gulp-sftp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.