I just begain studying how GPG works on Linux(Ubuntu20.04) and can't get my head around as why my subkey keeps getting a warning when encypting a file using the GPG command. I have also tried signing the key but a message shows that the key is already signed by the private key.
Sorry for the Japanese in the output. I made a simple translation after the "/".
As shown below, when I try encrypting the file "testfile.txt" the subkey fingerprint "AB4234D3B1CAF7120" is getting a warning.
Any help is appreciated. Thank you!
user999@penguin:~/.ssh$ gpg --encrypt --armor --recipient [email protected] testfile.txt
gpg: AB4234D3B1CAF7120: この鍵が本当に本人のものである、という兆候が、ありません/there is no sign of authenticity that the key belongs to the user.
sub rsa2048/AB4234D3B1CAF7120 2022-04-26 Username1 <[email protected]
主鍵フィンガープリント/Primary key fingerprint: 0D35 75AA F0FF 4E5E D41E 1A5C 5E03 21FC F3BB 8430
副鍵フィンガープリント/Subkey fingerprint: 0563 C84E D52C F75F BB16 99F7 AB42 34D3 B1CA F7120
この鍵は、このユーザIDをなのる本人のものかどうか確信できません。/cannot ensure the key belogns to the user id
今から行うことを本当に理解していない場合には、次の質問にはnoと答えてください。/select NO if you do not trust the key
それでもこの鍵を使いますか? (y/N) N
gpg: testfile.txt: encryption failed: 使用できない公開鍵です
user999@penguin:~/.ssh$
user999@penguin:~/.ssh$
user999@penguin:~/.ssh$ gpg --list-keys --keyid-format LONG
/home/user123/.gnupg/pubring.kbx
--------------------------------
pub rsa2048/5E0321FCF3BB8430 2022-04-26 [SC]
0D3575AAF0FF4E5ED41E1A5C5E0321FCF3BB8430
uid [ unknown ] Username1 <[email protected]>
sub rsa2048/AB4234D3B1CAF7120 2022-04-26 [E]```