mkloubert / vs-deploy

Visual Studio Code extension that provides commands to deploy files of a workspace to a destination.
https://marketplace.visualstudio.com/items?itemName=mkloubert.vs-deploy
MIT License
131 stars 24 forks source link

Cannot parse private key when using SFTP even though other app works just fine #172

Open chris-rutkowski opened 4 years ago

chris-rutkowski commented 4 years ago

Hello,

Would you be able to help me solve the problem:

[2020-08-24 08:14:11] [ERROR] buttons.reloadPackageButtons(3.0): Error: Could not deploy files (2): Error: Cannot parse privateKey: Unsupported key format

I use macOS Catalina 10.15.3, VScode 1.48.1, and Deploy plugin 14.0.0.

I checked with app "Cyberduck" and everything works fine. I'm able to login, list, add, update, delete files. Here is the configuration:

Screen Shot 2563-08-24 at 08 20 47

For security reasons I replaced my domain with api-example.app

However when I replicate it in the deploy settings as follows:

{
    "deploy": {
        "packages": [
            {
                "name": "Server",
                "files": [
                    "**/*.php",
                    "**/*.htaccess"
                ],
                "exclude": [
                    "tests/**"
                ],
                "button": {
                    "text": "Deploy",
                },
                "deployOnSave": true
            }
        ],
        "targets": [
            {
                "type": "sftp",
                "dir": "/var/www/api-example.app",
                "host": "api-example.app", "port": 22,
                "user": "chris",
                "privateKey": "/Users/crutkowski/.ssh/id_rsa",
            }
        ]
    }
}

I get there error as already mentioned. Appreciate any help. In order to generate this public private key pair I followed the instruction from github https://docs.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
HLFH commented 3 years ago

Same issue