我gnupg2
从 Homebrew 成功安装了公式,并且可以从命令行运行gpg2
。但是,某些程序(例如git
期望运行)gpg
而不是gpg2
.
我通过使用我觉得是一个肮脏的黑客解决了这个问题:gpg2
to的符号链接gpg
:
ln -s /usr/local/bin/gpg2 /usr/local/bin/gpg
有没有更合适的方法来做到这一点?我应该满足于安装gnupg
公式吗?
有点为 OSX 寻找类似的东西:How to set gpg2 as default implementation of gpg on debian? .
Jen*_*rat 29
请注意,GnuPG 2 有时输出略有不同,尤其是 GnuPG 2.1。这通常不是问题,但在极少数情况下可能会发生奇怪的事情。
单独配置gpg
每个应用程序要使用的二进制文件。例如,git 有gpg.program
选项。来自man gpg-config
:
gpg.program
Use this custom program instead of "gpg" found on $PATH when making or verifying
a PGP signature. The program must support the same command-line interface as
GPG, namely, to verify a detached signature, "gpg --verify $file - <$signature"
is run, and the program is expected to signal a good signature by exiting with
code 0, and to generate an ascii-armored detached signature, the standard input
of "gpg -bsau $key" is fed with the contents to be signed, and the program is
expected to send the result to its standard output.
Run Code Online (Sandbox Code Playgroud)
使用git config --global gpg.program gpg2
选择的GnuPG 2您的用户,或更换--global
与--system
更改设置为所有用户。
归档时间: |
|
查看次数: |
17215 次 |
最近记录: |