Problem with pinentry on Mac OSX #325
Labels
No labels
bug
Done
duplicate
enhancement
help wanted
incompatibility
invalid
need info
question
security
unconfirmed
upstream
user issue
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
PassFF/passff#325
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
General information. Describe your environment
Status line output:
[21:35:46] show -> gpg: decryption failed: No sec... (2)passff.py: Defaults except path to passff.pyActual behaviour
passffonly works whenpasshas has recently decrypted a file in the terminal. If this is the case,passffworks for any entry. Ifpasshas not been used recently thenpassffcan see the files in pass. However, when I click on them and select an action, nothing happens (there is no output to the web console either). I tried/confirmed:I deleted any file
passff.jsonin the folderNativeMessagingHostsand reinstalled the latest version of the host application. The only place on my systempassff.jsonwas installed was in theApplication supportfolder in my home directory.I made sure
passff.pyis executable and I openedpassff.jsonand verified the path is set to the absolute path of the host executablepassff.py.I confirmed in the
passff.pyscript that the path to pass matches its location in/usr/local/bin/pass, right where homebrew put it.I ran
echo -e "\x02\x00\x00\x00[]" | /path/to/passff.py | tail -c +4; echoand the output was similar to the empty store output plus my actual files in pass.I know pass works just fine as I use it all the time from the command line.
Expected behaviour
passffshould just work all the time and, I assume, prompt me for the passphrase within firefox? To be clear currentlypassffnever prompts me for the passphrase to my gpg key responsible for encryption inpass.Steps to reproduce the behaviour
Try
passffand it does not work.Decrypted a file with
pass / gpg2, so I enter my passphrase.Tried
passff. It works.Wait until
passrequires the passphrase again and repeat step 3.passfffails.Thanks for the troubleshooting help 5btentz!
Chris
Thanks for the thorough report!
I'm sorry to tell you the problem must not be in PassFF, or at least not directly. The problem is in the interaction of PassFF with its environment: presumably gpg-agent and your pinentry program.
I understood your problem because PassFF would sometimes work. It means something keeps states of what you are doing: this is the gpg-agent. It caches your passphrase for a while.
What kind of pin-entry program are you using?
Maybe a console pinentry cannot work with PassFF since the console is run by PassFF/Python3.
Is your pinentry working when the shell is non-interactive?
You can test that with this command: change the password name and the path to your passwords
EDIT:
atrun the command from the standard input 1 minute from now ;)I don't have a Mac so I cannot help much more. You are on your own 😢
For reference, I moved the old conversation (#324) here
CCheCastaldo
5bentz
Ok, I figured this out. If you use homebrew to install
gnupg, it installspinentryas a dependency. However,pinentryonly runs on the command line and therefore will not work withpassff. The solution is to:brew install pinentry-macAdd
pinentry-program /usr/local/bin/pinentry-macto~/.gnupg/gpg-agent.conf. You may need to create this file.Restart gpg from the terminal with
gpgconf --kill gpg-agent.Now if you use
passffit will prompt you for your passphrase, which you can choose to save in the keychain if you like.Credit to this post by Harpo Jaeger who had a similar problem with
enigmail.Chris
I've followed the instructions in the comment just above mine and passff still attempts to launch the cli pinentry:
This is on a
16" M4 Pro
MBP Nov 2024
macOS Sequoia 15.6.1
LibreWolf
As long as I decrypt the pass store beforehand, passff will work just fine
But if I don't it tries to launch the wrong pinentry even when the correct one is set in the
S.gpg-agent.confS.gpg-agent.confis the file that was created when I attempted to savegpg-agent.conf