在 gpg.conf 中获取其他配置文件

lan*_*tar 7 dotfiles gnupg

有没有办法在通常的 gpg.conf 中获取辅助配置文件?

我想在不同的工作站之间共享一组通用配置选项,但我还需要一些本地自定义。

Jen*_*rat 6

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)