假設我大多數時候只使用一個加密金鑰。
如何設定預設加密金鑰以避免在加密命令中提及它
換句話說,我想要這個命令:
gpg -e
相當於與接收者的命令
gpg -e -r [email protected]
答案1
GnuPG 知道這個--default-recipient
選項,它正是您正在尋找的。
--default-recipient name
Use name as default recipient if option --recipient is not used and don't
ask if this is a valid one. name must be non-empty.
gpg.conf
您可以透過省略前綴來指定 GnuPG 設定檔中的所有 GnuPG 選項--
,例如
default-recipient [email protected]