AGWA / git-crypt

Transparent file encryption in git
https://www.agwa.name/projects/git-crypt/
GNU General Public License v3.0
8.22k stars 476 forks source link

please support user-specified gpg executable #65

Closed smemsh closed 7 years ago

smemsh commented 8 years ago

On my system, the gpg binary is gpg1, but I want to use gpg2 (among other reasons, only gpg2 supports elliptic curves).

I looked at gpg.cpp and it looks like you are hardcoding gpg invocations with:

    command.push_back("gpg")
    ...

I am requesting to have available an environment or command-line override for the binary path, such as one of the following:

    git-crypt --gpg-command=`which gpg2` ...
    GIT_CRYPT_GPG=`which gpg2` git-crypt ...
    git config git-crypt.gpgcmd `which gpg2`
geowa4 commented 8 years ago

I agree; this should be changed. I like your suggestions. As a workaround, I've created a link: ln -s /usr/local/bin/gpg2 /usr/local/bin/gpg.

ip1981 commented 8 years ago

I'd prefer it being configurable at build-time, like

MAKE GPG=/path/to/gpgX

(defaulting to gpg2, gpg1 is over, really :-))

gvalkov commented 8 years ago

Just a data point: the git-remote-gcrypt project uses the gpg.program git config key for this.

AGWA commented 7 years ago

Thanks to the PR by @dcreemer, git-crypt now honors the gpg.program Git config option. This is the standard option used by Git to configure the gpg command.

ip1981 commented 7 years ago

Btw, next gpg will be named gpg, not gpg2 :)