vs-deploy
vs-deploy copied to clipboard
Cannot parse private key when using SFTP even though other app works just fine
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:

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]"
Same issue