age-keygen -y generates spurious warning when redirecting stdout to a file
ryancdotorg opened this issue · comments
Ryan Castellucci commented
Environment
- OS: Debian 10.9
- age version: (devel) - 2021-05-18
What were you trying to do
Create public key file
What happened
rc@pxl:~/code/age$ ls -al ~/.age.key
-r-------- 1 ryanc ryanc 189 May 18 11:25 /home/ryanc/.agekey
rc@pxl:~/code/age$ age-keygen -y ~/.age.key > ~/age.pub
Warning: writing secret key to a world-readable file.
I'm not writing a secret key here.
If I instead remove ~/age.pub
and run age-keygen -y -o ~/age.pub ~/.age.key
I do not get the warning.
Filippo Valsorda commented
Ah, good catch, thank you!