Closed kapsiR closed 2 years ago
The age format requires LF
everywhere, not CRLF
. But this is problematic on Windows, which will in some situations swap LF
for CRLF
in pipelines IIRC. I think this is what is happening during your keygen step. The ASCII-armored age encapsulation exists to get around this issue. Could you try this and see if it helps?
.\age-keygen.exe | .\age.exe -p -a > key3.age
You will likely also need to use -a
when encrypting the actual ciphertexts, for a similar reason.
See also #290.
Thanks! I'll try that and report it back here.
[EDIT]
I've verified it and with -a
it works. Thanks!
Indeed, this is a duplicate of #290. You just can't use redirection without -a
on Windows. Alternatively, also using -o
would work. I really wish we could find a way to detect this and print a warning, but it's kind of ridiculous for every CLI tool that outputs binary to have this issue.
Environment
What were you trying to do
Generate an identity file with an auto-generated passphrase and use it.
What happened
Keygen
Use it
Change CRLF to LF