Last active
July 24, 2017 01:24
-
-
Save lufia/ac0d3e987bc1a77da05194f5a82c3901 to your computer and use it in GitHub Desktop.
use password from keychain into secstore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sudo -p 'Password for %u:' bash -c " | |
cd $PLAN9/secstore | |
if [[ ! -d .git ]] | |
then | |
git init | |
git remote add origin git@ghe.fenrir-inc.com:$USER/secstore.git | |
fi | |
if [[ -z \$(git status -s) ]] | |
then | |
exit 0 | |
fi | |
git add -A | |
git commit -m \"$(date +'%Y-%m-%d %H:%M:%S')\" | |
export GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=no -i $HOME/.ssh/id_rsa' | |
git push -u origin master | |
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
security find-generic-password -a $USER -l secstore -w | | |
$PLAN9/bin/secstore -i "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment