Import a certificate from the Desktop App into akash cli

Has someone managed to import into the CLI a cert generated by the Desktop App (the one running on electron)?

I got both the armored pub and encrypted private key from the Desktop App.
They are like:

-----BEGIN CERTIFICATE-----
MFIAJR...........
-----END CERTIFICATE-----

And

-----BEGIN ENCRYPTED PRIVATE KEY-----
NMUSIEPR.............
-----END ENCRYPTED PRIVATE KEY-----

However it won’t be accepted by akash cli if I put both in a .pem file.
Getting this error:

akash provider lease-shell --dseq 32371 --from test test ls /
Enter keyring passphrase:
Error: x509: no DEK-Info header in block

And indeed, here what a .pem file generated by the cli looks like:

-----BEGIN CERTIFICATE-----
VMWIew...
-----END CERTIFICATE-----
-----BEGIN EC PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-256-CBC,0f225cf4d19a0b7ad28105feba8103cd

b2a/329...
-----END EC PRIVATE KEY-----

Any idea of how to move forward?

My goal is to have both the Desktop App and the CLI use the same account and certs.

1 Like

Hi,

I am also facing the same issue.

It seems that the generated private key by the desktop UI is not in the same format.

The only way to make it work right now seems to regenerate the certificate each time I switch from/to the CLI/UI.

Did you find a proper solution?

Thanks.

@ijkea Actually, you can generate a new certificate for your CLI usage, without importing the one generated by the desktop app.

For reference: How to import certificate generated by the app into akash cli · Issue #60 · Akashlytics/akashlytics-deploy · GitHub

Your certificate needs to be created only once per account and can be used across all deployments.