无法为存储在 Veracrypt 加密容器内的 .gnupg 文件夹启动 gpg-agent

无法为存储在 Veracrypt 加密容器内的 .gnupg 文件夹启动 gpg-agent

我的.gnupg目录位于使用 Veracrypt 加密的 USB 驱动器中。列出公钥可以gpg --homedir <path-to-usb-gnupg-dir> --list-keys正常工作,但是在尝试列出私钥时会出现问题--list-secret-keys

~ % gpg --homedir <path-to-usb-gnupg-dir> --list-secret-keys
gpg: error running '/opt/homebrew/Cellar/gnupg/2.4.3/bin/gpg-agent': exit status 2
gpg: failed to start gpg-agent '/opt/homebrew/Cellar/gnupg/2.4.3/bin/gpg-agent': General error
gpg: can't connect to the gpg-agent: General error
gpg: error running '/opt/homebrew/Cellar/gnupg/2.4.3/bin/gpg-agent': exit status 2
gpg: failed to start gpg-agent '/opt/homebrew/Cellar/gnupg/2.4.3/bin/gpg-agent': General error
gpg: can't connect to the gpg-agent: General error

我想这是因为挂载的容器的文件和目录权限不正确,发现Veracrypt有一个--fs-options命令(也在这个线程中讨论过)。问题是这个命令显然在 MacOS 上不起作用,因为运行它会生成以下错误:

Unknown long option 'fs-options'
Error: Incorrect command line specified.

我还尝试使用 将该.gnupg目录符号链接到我的主文件夹ln -s <path-to-usb-gnupg-dir> ~/.gnupg-usb,但错误仍然存​​在。此设置有任何可能的解决方法吗?

相关内容