Open ieugen opened 6 years ago
@ieugen thank you for this report.
Can you please try again with the most recent release of git-secret, 0.2.4?
Also, if you know what code change is required to fix this issue, please let us know or open a PR.
Thanks. I will give it a try. Unfortunatelly I don't know the fix but I will give it a try. Gpg is not the friendliest of softwares.
Hello, @ieugen, @simbo1905 , @sobolevn :
What's the right way to handle this?
Should we be reading ~/.gpg/gpg-agent.conf to find the correct 'pinentry-program' value?
I guess we can just have a configuration option. Reading this file will be almost impossible to implement correctly including all location/format/permission/versions stuff.
@sobolevn so are you envisioning a -nop
option for git-secret reveal
and hide
to disable use of gpg's --pinentry loopback
option? How would you see this looking in practice?
@joshrabinowitz :+1:
Should we be reading ~/.gpg/gpg-agent.conf to find the correct 'pinentry-program' value?
Not sure if we need to read it. I believe it has a command that can give us the value.
I think gpgconf should be ok. However, on my system it shows the wrong version of pinentry so I guess it does not read gpg-agent.conf where I set pinentry-program /usr/bin/pinentry-gnome3
. It is either a bug or I am doing something wrong.
gpgconf --list-components
gpg:OpenPGP:/usr/bin/gpg
gpg-agent:Private Keys:/usr/bin/gpg-agent
scdaemon:Smartcards:/usr/lib/gnupg/scdaemon
gpgsm:S/MIME:/usr/bin/gpgsm
dirmngr:Network:/usr/bin/dirmngr
pinentry:Passphrase Entry:/usr/bin/pinentry
---
gpgconf --list-dirs
sysconfdir:/etc/gnupg
bindir:/usr/bin
libexecdir:/usr/lib/gnupg
libdir:/usr/lib/x86_64-linux-gnu/gnupg
datadir:/usr/share/gnupg
localedir:/usr/share/locale
socketdir:/run/user/1000/gnupg
dirmngr-socket:/run/user/1000/gnupg/S.dirmngr
agent-ssh-socket:/run/user/1000/gnupg/S.gpg-agent.ssh
agent-extra-socket:/run/user/1000/gnupg/S.gpg-agent.extra
agent-browser-socket:/run/user/1000/gnupg/S.gpg-agent.browser
agent-socket:/run/user/1000/gnupg/S.gpg-agent
homedir:/home/ieugen/.gnupg
[1] https://www.gnupg.org/documentation/manuals/gnupg/gpgconf.html
I cannot get it setup correctly. I use it in a swift script and for now got it to work with the workaround to run git secret reveal
before I run my script. I created an issue in my fork https://github.com/dooZdev/Highway/issues/36
Any tips :) Thanks!
@doozMen are you using git-gui? i looked at your issue it names a Secrets.swift
that I cannot find after cloning your repo. i am not a swift programmer so if you can please provide the minimal steps to reproduce (such as a sample repo with Highway and a secret, if that is necessary, I am not sure) then we can take a look.
@doozMen also could you please post all the software versions (gpg, git-secret)
Following up on @sobolevn 's suggestion from Jul 14, 2018:
I propose that we support users who need to set --pinentry
(which this seems to be an example of), by supporting a SECRETS_PINENTRY=/path/here
env var and/or -e /path/here
(I'm open to other flags than -e
but -p
and -P
are already used for other purposes in git-secret).
Let's have SECRETS_PINENTRY
👍
SECRETS_PINENTRY=/path/here
won't work as --pinentry only accepts 'default', 'ask', 'cancel', 'error' and 'loopback'.
gpgagent has a --pinentry-program setting, but we don't interact with gpgagent directly in git-secret.
I suspect the right solution for this issue is to provide some way for the user to have git-secret ~not pass --pinentry=localhost
in the case where the user needs~ provide a way for the user to use a custom --pinentry
setting. See #490
What are the steps to reproduce this issue?
.git/hooks/pre-commit
I'm hiding secrets only if there are changes.
What happens?
Git gui hangs - because the gpg pass phrase is presented on standard input and I can't access that.
I believe I've tracked the code to this part in
/usr/bin/git-secret
What were you expecting to happen?
I should be presented with the gui pinentry application that I have setup in my
/.gnupg/gpg-agent.conf
viapinentry-program /usr/bin/pinentry-gnome3
.Any other comments?
I think Arch docs are explain gpg situation pretty good: https://wiki.archlinux.org/index.php/GnuPG#gpg-agent
What versions of software are you using?
Operating system: (
uname -a
) Linux default 4.16.0-2-amd64 #1 SMP Debian 4.16.12-1 (2018-05-27) x86_64 GNU/LinuxI'm using Debian testing (Buster).
git-secret
path: (which git-secret
) /usr/bin/git-secretgit-secret
version: (git secret --version
) 0.2.2git
version: (git --version
) 2.18.0 Shell type and version: ($SHELL --version
) zsh 5.5.1gpg
version: (gpg --version
) gpg (GnuPG) 2.2.8 libgcrypt 1.8.3