Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

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

Open
chris-rutkowski opened this issue Aug 24, 2020 · 1 comment

Comments

@chris-rutkowski
Copy link

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 "[email protected]"
@HLFH
Copy link

HLFH commented Jun 22, 2021

Same issue

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

No branches or pull requests

2 participants