Skip to content

Instantly share code, notes, and snippets.

@lifuzu
Created May 11, 2016 23:59
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save lifuzu/da249bf3267d5893a9f3d6c44b34f5c4 to your computer and use it in GitHub Desktop.
Save lifuzu/da249bf3267d5893a9f3d6c44b34f5c4 to your computer and use it in GitHub Desktop.
Unlock keychain for longer time
KEYCHAIN="/Users/jenkins/Library/Keychains/login.keychain"
echo "Unlock keychain"
security unlock-keychain -p secure $KEYCHAIN
echo "Increase keychain unlock timeout"
security set-keychain-settings -lut 7200 $KEYCHAIN
echo "Add keychain to keychain-list"
security list-keychains -s $KEYCHAIN
@macetw
Copy link

macetw commented Mar 15, 2019

How long is the default timeout?

@SimoPrG
Copy link

SimoPrG commented Sep 23, 2019

How long is the default timeout?

300

@sskjames
Copy link

sskjames commented Dec 4, 2020

Thank you very much. But why do you need this line?
security list-keychains -s $KEYCHAIN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment