0

I'm using pass to manage/consolidate passwords, but it takes a very long time to even ask for my gpg passphrase. It can take up to 30 seconds, which doesn't sound like an eternity but it sure feels like an eternity.

I'd love to figure out what is going on.

When I run it with strace it dumps a bunch to the screen and then gets to:

access("/usr/bin/gpg2", X_OK)           = 0
stat("/usr/bin/gpg2", {st_mode=S_IFREG|0755, st_size=917032, ...}) = 0
geteuid()                               = 1000
getegid()                               = 1000
getuid()                                = 1000
getgid()                                = 1000
access("/usr/bin/gpg2", R_OK)           = 0
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [INT CHLD], 8) = 0
rt_sigprocmask(SIG_SETMASK, [INT CHLD], NULL, 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fce7a0969d0) = 21903
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGINT, {0x4449b0, [], SA_RESTORER, 0x7fce796db4b0}, {SIG_DFL, [], SA_RESTORER, 0x7fce796db4b0}, 8) = 0
wait4(-1, 

It hangs out there and eventually I get a prompt for my gpg passphrase. Once I unlock my gpg key it spits the password right out, I don't understand why the prompt takes so long.

  • Do you have some sort of agent or keychain running? – jasonwryan Jan 23 '18 at 22:31
  • I have gpg-agent. – Amanda Jan 24 '18 at 1:18
  • If your agent flakes out and you call pass, you will see this sort of blocking. I'd be looking at the agent, not pass. – jasonwryan Jan 24 '18 at 1:42
  • Are you running pass on a remote machine, e.g. via ssh? If the gpg-agent on that remote machine is configured to try a GUI program first when asking for the password, you will get delays (or eventual timeout and fail). Check the pinentry-program setting in your ~/.gnupg/gpg-agent.conf. There are also various debug settings you can enable in that conf file. – cas Jan 24 '18 at 1:52
  • BTW, i use pinentry-program /usr/bin/pinentry-curses because I mostly use pass and gpg from the command line (or from text programs like mutt) and i want it to work in a local terminal and over ssh. I really don't care about a GUI for passphrase entry, so I've never bothered to find out how to get it to work reliably for both text-mode and GUI. – cas Jan 24 '18 at 1:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.