我使用gpg只是爲了加密和解密的目的。禁止在gnupg中發送警告消息
我使用的命令是:
for enc:
gpg --sign test
for dec:
gpg --decrypt test.gpg > test
,但我得到以下警告消息:
gpg: Signature made Fri Jun 24 17:29:00 2016 UTC using RSA key ID XXXX
gpg: Good signature from "[email protected]>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
關我當然基於互聯網搜索 --status-fd, --no-comment, --no-mdc-warning,--no-tty ,--no-verbose --quiet --batch, --no-greeting etc
嘗試。
有沒有辦法擺脫這些警告信息?
作爲最後的選擇,我使用 How to hide command output in bash
但我認爲應該有抑制GPG警告的簡單方法。
這是非常好的。我嘗試了一個類似的錯誤方式。 gpg --decrypt test.gpg 2>/dev/null> test 但在這種情況下,它覆蓋了該文件。 但你的回答很好。 它解決了這個問題。 謝謝.. –
@ArunKuttiyaraVarghese很高興我能幫忙:) – heemayl