bash – gpg加密文件,无需键盘交互
发布时间:2020-12-15 16:39:42 所属栏目:安全 来源:网络整理
导读:我在crontab中运行下一个命令加密文件,我不想要键盘交互 echo "PASSPHRASE" | gpg --passphrase-fd 0 -r USER --encrypt FILENAME.TXT 但我有这个答案: gpg: C042XXXX: There is no assurance this key belongs to the named userpub 40XXX/C042XXXX 2012-
我在crontab中运行下一个命令加密文件,我不想要键盘交互
echo "PASSPHRASE" | gpg --passphrase-fd 0 -r USER --encrypt FILENAME.TXT 但我有这个答案: gpg: C042XXXX: There is no assurance this key belongs to the named user pub 40XXX/C042XXXX 2012-01-11 Name LastName. (comment) <user@email.com> Primary key fingerprint: XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX Subkey fingerprint: XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX It is NOT certain that the key belongs to the person named in the user ID. If you *really* know what you are doing,you may answer the next question with yes. Use this key anyway? (y/N)
正如David所暗示的,这里的问题是gpg不信任你用来加密的公钥。你可以签署密钥,他解释。
另一个选择 – 特别是如果密钥可能偶尔改变 – 将坚持–trust-model总是对你的gpg命令。 这里是手册页中的相关位:
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |