Skip to content

Instantly share code, notes, and snippets.

@roock
Last active August 29, 2015 14:06
Show Gist options
  • Save roock/d219410ea888f2c29cbc to your computer and use it in GitHub Desktop.
Save roock/d219410ea888f2c29cbc to your computer and use it in GitHub Desktop.
Fix keychain timeout issue if timeout specified in keychain is greater than default max cache ttl in gnupg (default 2 hours)
--- a/keychain 2010-05-07 19:24:17.000000000 +0200
+++ b/keychain 2014-09-18 16:14:29.000000000 +0200
@@ -735,7 +735,7 @@
start_out=`ssh-agent`
elif [ "$start_prog" = gpg ]; then
if [ -n "${timeout}" ]; then
- start_gpg_timeout="--default-cache-ttl `expr $timeout \* 60`"
+ start_gpg_timeout="--default-cache-ttl `expr $timeout \* 60` --max-cache-ttl `expr $timeout \* 60`"
else
unset start_gpg_timeout
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment