This repository has been archived by the owner on Sep 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
#example: initialize_gopass.sh [email protected]:<YOURORGANIZATION>/<YOURSECRETSTORE> <YOURSECRETSTORE> | ||
|
||
REPOSITORY_LIST_JSON=$1 | ||
SSHFILE=$2 | ||
GPGFILE=$3 | ||
LOGFILE=gopass.log | ||
|
||
GOPASS_VERSION="1.8.6" | ||
|
@@ -11,15 +13,13 @@ set -e | |
|
||
function initialize_ssh { | ||
#initialize ssh to checkout secret store | ||
mkdir -p $HOME/.ssh | ||
cp ssh-key/identity $HOME/.ssh/id_rsa | ||
chmod 700 $HOME/.ssh | ||
chmod 600 $HOME/.ssh/id_rsa | ||
chmod 600 $HOME/.ssh/${SSHFILE} | ||
} | ||
|
||
function import_and_trust_gpg-key { | ||
# import gpg keys to keystore | ||
gpg --import $HOME/gpg-import/argo.asc &>> $LOGFILE | ||
gpg --import $HOME/gpg-import/${GPGFILE} &>> $LOGFILE | ||
# trust imported keys | ||
for fpr in $(gpg --list-keys --with-colons | awk -F: '/fpr:/ {print $10}' | sort -u &>> $LOGFILE); do echo -e "5\ny\n" | gpg --command-fd 0 --expert --edit-key $fpr trust &>> $LOGFILE ; done | ||
} | ||
|