Set up GPG-Agent
cache to avoid entering the password every time.
In the home directory of Windows
, locate 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 for the first time
Write-Output "Hello World" | gpg --clearsign
No password required for the second time
Write-Output "Hello World" | gpg --clearsign
🆗, mission accomplished.