小编kna*_*arf的帖子

gpg 无法解锁无密码的密钥:“gpg:公钥解密失败:未给出密码”

我有一个从旧版 gpg 开始的 gpg 设置,当时我没有使用密码。当提示输入时,我会直接输入 enter 。我不确定这是否意味着密钥未加密,或者是否使用空密码加密。

无论如何,当我尝试解密最近发送给我的东西时,gpg 需要访问我的私钥并提示我输入密码,但现在我不能再使用空密码了。gpg 失败:

$ gpg -d foo.asc
(X dialog that prompts me for passphrase, I just press enter)
gpg: public key decryption failed: No passphrase given
gpg: decryption failed: No secret key
Run Code Online (Sandbox Code Playgroud)

我希望能够再次使用我的钥匙。从现在开始我不介意设置密码,但我不知道如何:

$ gpg --passwd xxxxxxx@xxxxxxx.com
(X dialog that prompts me for current passphrase, I just press enter)
gpg: key xxxxxxxxxxxxxxxx/aaaaaaaaaaaaaaaa: error changing passphrase: No passphrase given
gpg: key xxxxxxxxxxxxxxxx/bbbbbbbbbbbbbbbb: error changing passphrase: No passphrase given
gpg: error changing the passphrase for …
Run Code Online (Sandbox Code Playgroud)

encryption gpg pgp

5
推荐指数
1
解决办法
2737
查看次数

标签 统计

encryption ×1

gpg ×1

pgp ×1