Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when connecting to SFTP #113

Open
mdelorimier opened this issue Apr 3, 2018 · 4 comments
Open

Error when connecting to SFTP #113

mdelorimier opened this issue Apr 3, 2018 · 4 comments

Comments

@mdelorimier
Copy link

mdelorimier commented Apr 3, 2018

Hello,

I am having an issue when trying to connect to a SFTP server. This might be linked to the server's fingerprint not beeing known (it is present in ~/.ssh/known_hosts).

Using the ssh2 package, I am able to connect and get folder listing using the same configuration.

Here is the configuration file :

stage:
    scheme: sftp
    host: "***.com"
    port: 22
    user: "***"
    pass: "***"
    check: true
    path:
        local: "dist/browser/"
        remote: "public_html/"

Here is the error :

TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.
    at Function.Buffer.from (buffer.js:161:9)
    at new Buffer (buffer.js:131:17)
    at onNEWKEYS (C:\Users\Mathieu de Lorimier\AppData\Roaming\npm\node_modules\dploy\node_modules\ssh2\lib\Connection.js:2282:29)
    at Parser.<anonymous> (C:\Users\Mathieu de Lorimier\AppData\Roaming\npm\node_modules\dploy\node_modules\ssh2\lib\Connection.js:123:5)
    at emitNone (events.js:105:13)
    at Parser.emit (events.js:207:7)
    at Parser.parsePacket (C:\Users\Mathieu de Lorimier\AppData\Roaming\npm\node_modules\dploy\node_modules\ssh2\lib\Parser.js:468:12)
    at Parser.execute (C:\Users\Mathieu de Lorimier\AppData\Roaming\npm\node_modules\dploy\node_modules\ssh2\lib\Parser.js:249:14)
    at Socket.<anonymous> (C:\Users\Mathieu de Lorimier\AppData\Roaming\npm\node_modules\dploy\node_modules\ssh2\lib\Connection.js:523:18)
    at emitOne (events.js:115:13)

Regards

@daywalker2811
Copy link

Hi @mdelorimier

I'm not an expert in Yaml but I think you should remove the double quotes around values.

Kind regards

@mdelorimier
Copy link
Author

mdelorimier commented Apr 7, 2018

@daywalker2811 I don't beleive that is the issue : https://stackoverflow.com/a/11301675/643039

I have semicolon in password so I need to escape it using quotes.

@pegaltier
Copy link

I also encounter problem using sftp

Error log:

[ + ] Fail uploading file site/README.md: { Error: No such file
at SFTP._parse (C:\Users\pegal\AppData\Roaming\npm\node_modules\dploy\node_modules\ssh2\lib\SFTP\SFTPv3.js:986:23)
at ChannelStream. (C:\Users\pegal\AppData\Roaming\npm\node_modules\dploy\node_modules\ssh2\lib\SFTP\SFTPv3.js:49:12)
at emitOne (events.js:116:13)
at ChannelStream.emit (events.js:211:7)
at ChannelStream.emit (C:\Users\pegal\AppData\Roaming\npm\node_modules\dploy\node_modules\ssh2\lib\Channel.js:640:12)
at Parser. (C:\Users\pegal\AppData\Roaming\npm\node_modules\dploy\node_modules\ssh2\lib\Channel.js:95:20)
at emitOne (events.js:116:13)
at Parser.emit (events.js:211:7)
at Parser.parsePacket (C:\Users\pegal\AppData\Roaming\npm\node_modules\dploy\node_modules\ssh2\lib\Parser.js:607:12)
at Parser.execute (C:\Users\pegal\AppData\Roaming\npm\node_modules\dploy\node_modules\ssh2\lib\Parser.js:249:14) type: 'NO_SUCH_FILE', lang: '' }
[ + ] Fail uploading file site/README.md: { Error: No such file
at SFTP._parse (C:\Users\pegal\AppData\Roaming\npm\node_modules\dploy\node_modules\ssh2\lib\SFTP\SFTPv3.js:986:23)
at ChannelStream. (C:\Users\pegal\AppData\Roaming\npm\node_modules\dploy\node_modules\ssh2\lib\SFTP\SFTPv3.js:49:12)
at emitOne (events.js:116:13)
at ChannelStream.emit (events.js:211:7)
at ChannelStream.emit (C:\Users\pegal\AppData\Roaming\npm\node_modules\dploy\node_modules\ssh2\lib\Channel.js:640:12)
at Parser. (C:\Users\pegal\AppData\Roaming\npm\node_modules\dploy\node_modules\ssh2\lib\Channel.js:95:20)
at emitOne (events.js:116:13)
at Parser.emit (events.js:211:7)
at Parser.parsePacket (C:\Users\pegal\AppData\Roaming\npm\node_modules\dploy\node_modules\ssh2\lib\Parser.js:607:12)
at Parser.execute (C:\Users\pegal\AppData\Roaming\npm\node_modules\dploy\node_modules\ssh2\lib\Parser.js:249:14) type: 'NO_SUCH_FILE', lang: '' }

@mararn1618
Copy link

mararn1618 commented May 19, 2021

Same problem here. SFTP doesn't work.

version

$ dploy --version
v1.2.0

config

prod:
    scheme: sftp
    port: 21098
    host: 198.54.***.***
    user: *****
    check: true
    include:
        "public/**/*.*": "/"
    path:
        local: public
        remote: /public_html/

error

– Are you sure you want to upload those files? (Y/n) readline.js:1086
            throw err;
            ^
TypeError: Cannot read property 'answer' of undefined
    at C:\Users\publi\AppData\Roaming\npm\node_modules\dploy\lib\deploy.js:578:20
    at C:\Users\publi\AppData\Roaming\npm\node_modules\dploy\node_modules\prompt\lib\prompt.js:316:20
    at C:\Users\publi\AppData\Roaming\npm\node_modules\dploy\node_modules\async\lib\async.js:136:21
    at assembler (C:\Users\publi\AppData\Roaming\npm\node_modules\dploy\node_modules\prompt\lib\prompt.js:282:18) 
    at C:\Users\publi\AppData\Roaming\npm\node_modules\dploy\node_modules\prompt\lib\prompt.js:322:20
    at C:\Users\publi\AppData\Roaming\npm\node_modules\dploy\node_modules\prompt\lib\prompt.js:510:14
    at onError (C:\Users\publi\AppData\Roaming\npm\node_modules\dploy\node_modules\read\lib\read.js:94:12)        
    at Interface.<anonymous> (C:\Users\publi\AppData\Roaming\npm\node_modules\dploy\node_modules\read\lib\read.js:66:5)
    at Interface.emit (events.js:198:13)
    at Interface._ttyWrite (readline.js:801:16)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants