因为这似乎不是一个 Arch Linux 特有的问题(并且 Arch 论坛无法帮助我)所以我尝试询问更广泛的专家。
几天以来,我无法再访问我的 kwallet。假设问题首先出现在 kwallet 中,我现在已经知道问题更深层地存在于 gpg 系统中。我将问题分解为无法再访问密钥。虽然 gpg 中列出了所有密钥,但无法访问。尝试通过 CLI 使用密钥解密消息时,我收到以下错误消息
[kk@excelsior]$ gpg -vvv --output test.txt.gpg.txt --decrypt test.txt.gpg
gpg: using character set 'iso-8859-1'
# off=0 ctb=84 tag=1 hlen=2 plen=94
:pubkey enc packet: version 3, algo 18, keyid AXXXXXXXXXXXXXX
data: [263 bits]
data: [392 bits]
gpg: public key is AXXXXXXXXXXXXXX
gpg: using subkey AXXXXXXXXXXXXXX instead of primary key AXXXXXXXXXXXXXX
# off=96 ctb=d2 tag=18 hlen=2 plen=182 new-ctb
:encrypted data packet:
length: 182
mdc_method: 2
gpg: using subkey AXXXXXXXXXXXXXX instead of primary key AXXXXXXXXXXXXXX
gpg: encrypted with 255-bit ECDH key, ID AXXXXXXXXXXXXXX, created 2021-03-12
"user <[email protected]>"
gpg: public key decryption failed: No pinentry
gpg: decryption failed: No secret key
我尝试通过调整 ~/.gnupg/gpg-agent.conf 来修复缺失的 pinentry,如下所示:
default-cache-ttl 1
pinentry-program /usr/bin/pinentry-qt
###+++--- GPGConf ---+++###
debug-level basic
log-file socket:///home/kk/.gnupg/log-socket
###+++--- GPGConf ---+++### So 04 Okt 2020 22:33:36 CEST
# GPGConf edited this configuration file.
# It will disable options before this marked block, but it will
# never change anything below these lines.
我还重新安装了 pinentry 包并确保链接正确:
[kk@excelsior]$ ls -liah /usr/bin/pinentry*
45410269 -rwxr-xr-x 1 root root 369 Sep 19 20:53 /usr/bin/pinentry
45410270 -rwxr-xr-x 1 root root 75K Sep 19 20:53 /usr/bin/pinentry-curses
45410271 -rwxr-xr-x 1 root root 67K Sep 19 20:53 /usr/bin/pinentry-emacs
45410272 -rwxr-xr-x 1 root root 87K Sep 19 20:53 /usr/bin/pinentry-gnome3
45410273 -rwxr-xr-x 1 root root 95K Sep 19 20:53 /usr/bin/pinentry-gtk-2
45410274 -rwxr-xr-x 1 root root 159K Sep 19 20:53 /usr/bin/pinentry-qt
45410275 -rwxr-xr-x 1 root root 67K Sep 19 20:53 /usr/bin/pinentry-tty
尽管如此,还是没有成功。仍然是相同的错误消息。我清理了主目录中的 .gnupg 目录并手动导入密钥,但结果仍然相同。看起来用户配置没有搞砸。有人知道吗?
答案1
啊,解决方案发布在https://bbs.archlinux.org/viewtopic.php?pid=2025554原因似乎是缺少对 tpm2-tss 的依赖。