
gpg 키를 생성하려면 다음 명령을 사용하고 있습니다.
#!/bin/bash
cat > /tmp/gpg.txt << EOF
%echo Generating a basic OpenPGP key
Key-Type: DSA
Key-Length: 1024
Subkey-Type: ELG-E
Subkey-Length: 1024
Name-Real: test
Name-Comment: test
Name-Email: [email protected]
Expire-Date: 0
Passphrase: test
%pubring test.pub
%secring test.sec
%commit
%echo done
EOF
gpg2 --armor --batch --gen-key /tmp/gpg.txt
rm -f /tmp/gpg.txt
부분적으로 작동합니다. test.pub
생성 만 되고 test.sec
비어 있습니다.
어떤 아이디어가 있나요?