Created
January 3, 2020 07:46
-
-
Save prashcr/834b8ef2023198068e708e3dc6a15a7f to your computer and use it in GitHub Desktop.
Work around a bug in git-crypt
This file contains hidden or 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
#!/bin/sh | |
# | |
# git-crypt-unlock - Work around a bug in git-crypt. | |
umask 077 | |
for FILE in `find .git-crypt/keys/**/* -type f`; do | |
if gpg -q --decrypt < $FILE > git-crypt-symmetric-key 2> /dev/null; then | |
git-crypt unlock git-crypt-symmetric-key | |
rm -f git-crypt-symmetric-key | |
echo 'unlocked' | |
exit 0 | |
fi | |
done | |
echo 'could not unlock' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment