mkloubert / vscode-deploy-reloaded

Recoded version of Visual Studio Code extension 'vs-deploy', which provides commands to deploy files to one or more destinations.
https://marketplace.visualstudio.com/items?itemName=mkloubert.vscode-deploy-reloaded
GNU Lesser General Public License v3.0
164 stars 39 forks source link

Using SSH Private Key requires password stored in plain text #71

Open IamTheFij opened 6 years ago

IamTheFij commented 6 years ago

Description

Unable to receive a prompt for SSH Private Key passphrase

Actual behavior

When adding a private key to the configs, I get failures due to missing passphrase

Expected behavior

I expect a prompt asking me for my passphrase, as with the username/password auth.

Steps to reproduce

Add an encrypted private key to the config but do not add the passphrase. Attempt to deploy a file.

Example config

{
    "deploy.reloaded": {
        "packages": [
            {
                "name": "Full",
                "files": [
                    "/**/*"
                ]
            }
        ],
        "targets": [
            {
                "type": "sftp",
                "name": "devbox",
                "description": "My devbox",
                "dir": "/nail/home/iamthefij/workspace/my_project",
                "host": "my-server",
                "privateKey": "/Users/iamthefij/.ssh/id_rsa",
                "user": "iamthefij"
            }
        ]
    }

Logs

🔥 [ERROR] Could not deploy files to 'devbox': 'Encrypted private key detected, but no passphrase given'

Screenshot

N/A

Your environment

Additional comments

This is probably a feature request...

Zaczero commented 6 years ago

+1 It would be nice to add features like:

I really miss the cache feature for alwaysAskForPassword and alwaysAskForUser when I do a lot of changes to the project :(

mkloubert commented 6 years ago

@IamTheFij @Zaczero

Sorry, that I am answer so late!

I implemeted the both settings alwaysAskForPrivateKeyPassphrase and askForPrivateKeyPassphrase in version 0.81.1.

Zaczero commented 6 years ago

Thanks!
How about askForPassword (cached version of alwaysAskForPassword) and askForUser (also cache)? Any chance for getting these?

They should work similar to askForPrivateKeyPassphrase that you have just added.
It would be perfect 🦀

mkloubert commented 6 years ago

@Zaczero

Sorry, my mistake.

I will implement them soon.

Zaczero commented 6 years ago

@mkloubert no problem, it's kinda late already so I understand :)
Love your extension ❤️

mkloubert commented 6 years ago

The askForPassword and askForUser settings are implemented for FTP and SFTP now (since version 0.82.0).