Mej*_*eji 31 security arch-linux encryption gpg
我正在尝试生成一个 gpg 密钥
$ gpg --full-gen-key
Run Code Online (Sandbox Code Playgroud)
但最终我得到一个错误
gpg: agent_genkey failed: No such file or directory
Key generation failed: No such file or directory
Run Code Online (Sandbox Code Playgroud)
我在 Arch Linux 上。
$ gpg --version
gpg (GnuPG) 2.1.15
libgcrypt 1.7.3
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: /home/me123/.gnupg
.............
Run Code Online (Sandbox Code Playgroud)
目录 /home/me123/.gnupg 存在
小智 45
你是不是把/home/me123/.gnupg目录删了然后gpg重新创建了?如果是这样,这可能是使代理感到困惑的原因。
要么重新启动代理 ( gpgconf --kill gpg-agent),要么更彻底地重新启动您的机器并重试。
小智 18
似乎没有创建目录 ~/.gnupg/private-keys-v1.d(在某些情况下),或者使用错误的权限创建。
# mkdir -p ~/.gnupg/private-keys-v1.d
# chmod 700 ~/.gnupg/private-keys-v1.d
Run Code Online (Sandbox Code Playgroud)
为我修好了。