无法在linux中生成gpg密钥

无法在linux中生成gpg密钥,第1张

概述我无法在 linux中生成GPG密钥 sudo gpg --gen-key # This is the command to try to generate key 错误 You need a Passphrase to protect your secret key.gpg: problem with the agent: Timeout gpg: Key gene 我无法在 linux中生成GPG密钥
sudo gpg --gen-key      # This is the command to try to generate key

错误

You need a Passphrase to protect your secret key.gpg: problem with the agent: Timeout        gpg: Key generation canceled.

请告诉我我在哪里做错了

解决方法 请检查一下

1)运行gpg-agent命令:

gpg-agent --daemon --use-standard-socket --pinentry-program /usr/bin/pinentry-curses

2)生成足够的熵

sudo rngd -r /dev/urandom

3)最后运行gpg命令生成密钥:

gpg --gen-key

请仅使用非root用户运行所有命令

请使用相同的用户登录,该用户用于创建gpg密钥.

1.我们将导出我们的公钥和私钥如下:

user$gpg --export -a -o mypublickey.txt [email protected]  user$gpg --export-secret-key -a -o myprivatekey.txt [email protected]  user$ls my*

myprivatekey.txt mypublickey.txt

>使用相同用户导入密钥

User$gpg --import myprivatekey.txt

>现在尝试用同一个用户解密

总结

以上是内存溢出为你收集整理的无法在linux中生成gpg密钥全部内容,希望文章能够帮你解决无法在linux中生成gpg密钥所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/1049311.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-25
下一篇 2022-05-25

发表评论

登录后才能评论

评论列表(0条)

保存