我运行gpg --list-keys,它向我显示了钥匙圈中的钥匙:
/home/kshitiz/.gnupg/pubring.gpg
--------------------------------
pub 4096R/8F64D7E0 2015-02-18
uid Kshitiz Sharma (http://ksharma.in) <ksharma.android@gmail.com>
sub 4096R/C87EAA9F 2015-02-18
sub 4096R/B63EFB4D 2015-02-18
Run Code Online (Sandbox Code Playgroud)
我删除我的密钥:
$ gpg --delete-secret-key ksharma.android@gmail.com
sec 4096R/8F64D7E0 2015-02-18 Kshitiz Sharma (http://ksharma.in) <ksharma.android@gmail.com>
Delete this key from the keyring? (y/N) y
This is a secret key! - really delete? (y/N) y
Run Code Online (Sandbox Code Playgroud)
然后再次列出键gpg --list-keys。相同的输出:
/home/kshitiz/.gnupg/pubring.gpg
--------------------------------
pub 4096R/8F64D7E0 2015-02-18
uid Kshitiz Sharma (http://ksharma.in) <ksharma.android@gmail.com>
sub 4096R/C87EAA9F 2015-02-18
sub 4096R/B63EFB4D 2015-02-18
Run Code Online (Sandbox Code Playgroud)
为什么密钥8F64D7E0没有被删除?
奇怪的是,gpg --delete-secret-key再次运行说找不到密钥:
gpg: key "ksharma.android@gmail.com" …Run Code Online (Sandbox Code Playgroud) gnupg ×1