Created
April 25, 2020 03:13
-
-
Save dkess/5943d96ce09fb120140058014cc1b205 to your computer and use it in GitHub Desktop.
dkess's recovery script
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
#!/bin/bash | |
# gpg -o env -d env.gpg | |
# sudo systemd-run -p DynamicUser=1 -p PrivateTmp=1 --working-directory=/tmp --setenv=HOME=/tmp -p EnvironmentFile="$(realpath recovery.env)" --pty --wait --service-type=exec recovery.sh | |
set -euo pipefail | |
export GPG_TTY=$(tty) | |
gpg --import /dev/stdin <<< "$GPGKEY" | |
unset GPGKEY | |
pipx run b2 authorize-account | |
mkdir passwords | |
pipx run b2 sync "$B2_PATH" passwords | |
git clone gcrypt::"$(realpath passwords)" pgit | |
PASSWORD_STORE_DIR=pgit pass git --no-pager log --name-status HEAD^..HEAD | |
PASSWORD_STORE_DIR=pgit pass show test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment