Impossible to save Armored Keys Within dotenv file #1273
Unanswered
comicallybad
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Could you |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have tried everything for about 2 hours with no luck. I want to of course keep my keys private after I have generated them. As well as my passphrase, etc. No matter what I have tried, I either get
Error: Misformed armored text
orreadKey: must pass options object containing armoredKey or binaryKey
I am able to run it and have it work fine if I input the pgp keys directly into the file, but that is kind of counter intuitive as you want at least the private key and passphrase to be hidden. How can I do this? I have tried formatting my .env every way I could think of, some format methods resulted in the readKey error, some resulted in the Misformed armored text error. I tried using toString, I tried just using process.env.PUBLIC without tic marks. I tried with tic marks. With tic marks with toString. No matter what I get an error. If anyone could help I would greatly appreciate it.AND NO, I do not want to just create a json file and put the keys in there. I know that would work, but I would much rather use dotenv.
Side note, I also want to use my GNUPG key that I have already created and use all the time, however, I get an error stating that the pgp message or format is invalid. I know there are some differences, I guess I can just use a new generated PGP, but if there is any way I can use my GNUPG key please let me know.
Beta Was this translation helpful? Give feedback.
All reactions