Set up GPG-Agent
cache to avoid entering the password every time.
In the home directory of Windows
, find the .gnupg/gpg-agent.conf
file.
If it doesn't exist, create one.
Edit the gpg-agent.conf
file and add the following content
default-cache-ttl 31536000 # 365 days
max-cache-ttl 31536000 # 365 days
Reload GPG-Agent
and test if the password is not required the second time.
gpg-connect-agent reloadagent /bye
Password is required the first time
Write-Output "Hello World" | gpg --clearsign
No password required the second time
Write-Output "Hello World" | gpg --clearsign
🆗, mission accomplished.