GnuPG 不允许从配置文件中获取配置文件:
--options file
Read options from file and do not try to read them from the default
options file in the homedir (see --homedir). This option is ignored
if used in an options file.
Run Code Online (Sandbox Code Playgroud)
--options
不过,您可以多次使用命令行参数;因此您可以创建一个像这样的别名或包装器脚本,加载共享和本地配置文件:
gpg --options ~/.dotfiles/gnupg/gpg.conf --options ~/.gnupg/gpg.conf
Run Code Online (Sandbox Code Playgroud)