gpg 배치: 빈 암호화 파일을 생성했습니다.

gpg 배치: 빈 암호화 파일을 생성했습니다.

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비어 있습니다.

어떤 아이디어가 있나요?

답변1

좋아, 그래서 해결책을 찾았습니다. 표지에 따르면GnuPG 문서, 이것

%secring test.sec

이제 더 이상 사용되지 않습니다:

%secring filename

    This option is a no-op for GnuPG 2.1 and later.

    See the previous subsection “Ephemeral home directories”.

이는 여기에 설명된 대로 개인 키가 저장되는 방식을 변경했기 때문입니다.기타 문서 페이지.

관련 정보