When using password-secured SSH keys I can use ssh-add to preemptively unlock a key before it needs to be used and have it cached in ssh-agent for future use. What is a GPG equivalent of ssh-add? I know how to increase the caching time of GPG keys once they are unlocked but I don't know how to unlock a GPG key before it needs to be used, other than artificially issuing a command that will trigger the unlock, e.g. git commit (I have commit signing enabled).
Add a comment |
1 Answer
No, there is no GPG equivalent of ssh-add.
GPG require you to enter the passphrase when needed, and it will then cache it for future use so that you don't need to enter the passphrase again.
A workaround would be using gpg --clearsign followed by Ctrl+D to trigger a passphrase input dialog.