skeeto / passphrase2pgp

Generate a PGP key from a passphrase
The Unlicense
187 stars 14 forks source link

Is it possible for passphrase2pgp to read password from stdin? #11

Closed luochen1990 closed 2 years ago

luochen1990 commented 2 years ago

I'm trying to provide password for passphrase2pgp from stdin, but following doesn't work (still trying to get password from pinentry):

echo "123456\n123456" | passphrase2pgp -u "test <test.example.com>" | gpg --import

Is there any other way?

luochen1990 commented 2 years ago

I find a solution like following:

printf 123456 | passphrase2pgp -u "test <test.example.com>" -i /dev/stdin | gpg --import