Closed krylop closed 1 year ago
Note that a cached passphrase may not be evicted immediately from memory if no client requests a cache operation. This is due to an internal housekeeping function which is only run every few seconds.
https://www.gnupg.org/documentation/manuals/gnupg/Agent-Options.html
1 second is probably too short?
After some research I found there is a way to start gpg-agent with custom settings.
gpg-agent.exe --options "./gpg-agent.conf" --daemon
gpg-agent.conf contains:
default-cache-ttl 1
That way gpg-agent prompt me for password every time
In addition I tested other values like 20s with pass-winmenu and without success.
For this functionality, pass-winmenu looks up where your GPG home directory is located. It then looks for a gpg-agent.conf
in that directory, creating it if it does not exist. It then adds the configuration keys to that file, or updates them if they are already present.
If you can't get this feature to work, there are a few things you can try:
AppData
.gpg-agent.conf
in your home directory. Pass-winmenu should have created one if it didn't exist yet, so if you can't find it, it is possible that pass-winmenu created it in the wrong place.gpg-agent.conf
file, make sure its contents look OK. Perhaps something went wrong with writing the file.Let me know if you still can't get it to work, or if pass-winmenu didn't create the gpg-agent.conf
in the correct location.
Thank you for reply.
By manually creating gpg-agent.conf
file in home directory and placing default-cache-ttl 1
in the file it worked.
So the issue is creating the file. My home directory is located in (pass-winmenu.exe location)/lib/GnuPG, so the same location as bin folder with all gpg executables.
In that case pass-winmenu probably expects your home directory to be somewhere else. The way it determines the home directory is as follows:
gpg.gnupghome-override
key in pass-winmenu.yaml
is set, its location is used.GNUPGHOME
environment variable is set, its location is used.AppData/Roaming/gnupg
path is used.In other words, you can most likely solve your issue by setting the configuration key or the environment variable.
Ideally though, pass-winmenu would just detect the right location straight away, so I'd like to solve this issue in pass-winmenu if possible. Do you know how your GPG installation chooses the folder with its executables as its home directory? Is it a portable installation by any chance?
In my case
gnupghome-override: null
GNUPGHOME
is not setAppData/Roaming/gnupg
doesn't existI did not install any GPG, I use portable version attached to pass-winmenu realise files. I simply extracted zip archive and started using pass-winnmenu.
Now I understand the issue and can solve it.
Setting related to gpg-agent doesn't seem to work. I have tried to restart gpg-agent after setting new values but without success. I have no custom gpg just one added with pass-winmenu.
This is my settings:
I set time to 1s to chceck if this will prompt me for passphrase