Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- + GITSECRET_VERSION=0.2.4
- + _SECRETS_DIR=.gitsecret
- + _SECRETS_DIR_KEYS=.gitsecret/keys
- + _SECRETS_DIR_PATHS=.gitsecret/paths
- + _SECRETS_DIR_KEYS_MAPPING=.gitsecret/keys/mapping.cfg
- + _SECRETS_DIR_KEYS_TRUSTDB=.gitsecret/keys/trustdb.gpg
- + _SECRETS_DIR_PATHS_MAPPING=.gitsecret/paths/mapping.cfg
- + : .secret
- + : gpg
- + : '_os_based __sha256'
- + AWK_FSDB_HAS_RECORD='
- BEGIN { FS=":"; OFS=":"; cnt=0; }
- {
- if ( key == $1 )
- {
- cnt++
- }
- }
- END { if ( cnt > 0 ) print "0"; else print "1"; }
- '
- + AWK_FSDB_RM_RECORD='
- BEGIN { FS=":"; OFS=":"; }
- {
- if ( key != $1 )
- {
- print $1,$2;
- }
- }
- '
- + AWK_FSDB_CLEAR_HASHES='
- BEGIN { FS=":"; OFS=":"; }
- {
- print $1,"";
- }
- '
- + AWK_GPG_VER_CHECK='
- /^gpg/{
- version=$3
- n=split(version,array,".")
- if( n >= 2) {
- if(array[1] >= 2)
- {
- if(array[2] >= 1)
- {
- print 1
- }
- else
- {
- print 0
- }
- }
- else
- {
- print 0
- }
- }
- else if(array[1] >= 2)
- {
- print 1
- }
- else
- {
- print 0
- }
- }
- '
- ++ gpg --version
- ++ gawk '
- /^gpg/{
- version=$3
- n=split(version,array,".")
- if( n >= 2) {
- if(array[1] >= 2)
- {
- if(array[2] >= 1)
- {
- print 1
- }
- else
- {
- print 0
- }
- }
- else
- {
- print 0
- }
- }
- else if(array[1] >= 2)
- {
- print 1
- }
- else
- {
- print 0
- }
- }
- '
- + GPG_VER_21=1
- + AWK_FSDB_UPDATE_HASH='
- BEGIN { FS=":"; OFS=":"; }
- {
- if ( key == $1 )
- {
- print key,hash;
- }
- else
- {
- print $1,$2;
- }
- }
- '
- + AWK_ADD_TO_GITIGNORE='
- BEGIN {
- cnt=0
- }
- function check_print_line(line){
- if (line == pattern) {
- cnt++
- }
- print line
- }
- # main function
- {
- check_print_line($0) # check and print first line
- while (getline == 1) { # check and print all other
- check_print_line($0)
- }
- }
- END {
- if ( cnt == 0) { # if file did not contain pattern add
- print pattern
- }
- }
- '
- + AWK_GPG_KEY_CNT='
- BEGIN { cnt=0; OFS=":"; FS=":"; }
- flag=0; $1 == "pub" { cnt++ }
- END { print cnt }
- '
- + set -e
- + _init_script hide -d -m
- + [[ 3 == 0 ]]
- + local dry_run=0
- + [[ 3 -gt 0 ]]
- + local opt=hide
- + case "$opt" in
- + break
- + [[ 0 == 0 ]]
- + _check_setup
- + local is_tree
- ++ _is_inside_git_tree
- ++ local result
- +++ git rev-parse --is-inside-work-tree
- +++ echo 0
- ++ result=0
- ++ echo 0
- + is_tree=0
- + [[ 0 -ne 0 ]]
- + _secrets_dir_is_not_ignored
- + local git_secret_dir
- ++ _get_secrets_dir
- ++ _append_root_path .gitsecret
- ++ local path=.gitsecret
- ++ local root_path
- +++ _get_git_root_path
- +++ local result
- ++++ git rev-parse --show-toplevel
- +++ result=/Users/examp/gitsrc/jcreds-amazon
- +++ echo /Users/examp/gitsrc/jcreds-amazon
- ++ root_path=/Users/examp/gitsrc/jcreds-amazon
- ++ echo /Users/examp/gitsrc/jcreds-amazon/.gitsecret
- + git_secret_dir=/Users/examp/gitsrc/jcreds-amazon/.gitsecret
- + local cleanup=0
- + [[ ! -d /Users/examp/gitsrc/jcreds-amazon/.gitsecret ]]
- + local ignores
- ++ _check_ignore /Users/examp/gitsrc/jcreds-amazon/.gitsecret
- ++ local filename=/Users/examp/gitsrc/jcreds-amazon/.gitsecret
- ++ local result
- +++ git add -n /Users/examp/gitsrc/jcreds-amazon/.gitsecret
- +++ echo 0
- ++ result=0
- ++ [[ 0 -ne 0 ]]
- ++ result=1
- ++ echo 1
- + ignores=1
- + [[ 0 == 1 ]]
- + [[ ! 1 -eq 1 ]]
- + local keys_dir
- ++ _get_secrets_dir_keys
- ++ _append_root_path .gitsecret/keys
- ++ local path=.gitsecret/keys
- ++ local root_path
- +++ _get_git_root_path
- +++ local result
- ++++ git rev-parse --show-toplevel
- +++ result=/Users/examp/gitsrc/jcreds-amazon
- +++ echo /Users/examp/gitsrc/jcreds-amazon
- ++ root_path=/Users/examp/gitsrc/jcreds-amazon
- ++ echo /Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys
- + keys_dir=/Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys
- + local secring=/Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys/secring.gpg
- + [[ -f /Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys/secring.gpg ]]
- + [[ -s /Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys/secring.gpg ]]
- + local function_exists
- ++ _function_exists hide
- ++ local function_name=hide
- ++ declare -f -F hide
- ++ echo 0
- + function_exists=0
- + [[ 0 == 0 ]]
- + [[ ! hide == _* ]]
- + hide -d -m
- + local clean=0
- + local delete=0
- + local fsdb_update_hash=0
- + local verbose=
- + OPTIND=1
- + getopts cdmvh opt
- + case "$opt" in
- + delete=1
- + getopts cdmvh opt
- + case "$opt" in
- + fsdb_update_hash=1
- + getopts cdmvh opt
- + shift 2
- + '[' '' = -- ']'
- + _user_required
- + _secrets_dir_exists
- + local full_path
- ++ _get_secrets_dir
- ++ _append_root_path .gitsecret
- ++ local path=.gitsecret
- ++ local root_path
- +++ _get_git_root_path
- +++ local result
- ++++ git rev-parse --show-toplevel
- +++ result=/Users/examp/gitsrc/jcreds-amazon
- +++ echo /Users/examp/gitsrc/jcreds-amazon
- ++ root_path=/Users/examp/gitsrc/jcreds-amazon
- ++ echo /Users/examp/gitsrc/jcreds-amazon/.gitsecret
- + full_path=/Users/examp/gitsrc/jcreds-amazon/.gitsecret
- + [[ ! -d /Users/examp/gitsrc/jcreds-amazon/.gitsecret ]]
- + local trustdb
- ++ _get_secrets_dir_keys_trustdb
- ++ _append_root_path .gitsecret/keys/trustdb.gpg
- ++ local path=.gitsecret/keys/trustdb.gpg
- ++ local root_path
- +++ _get_git_root_path
- +++ local result
- ++++ git rev-parse --show-toplevel
- +++ result=/Users/examp/gitsrc/jcreds-amazon
- +++ echo /Users/examp/gitsrc/jcreds-amazon
- ++ root_path=/Users/examp/gitsrc/jcreds-amazon
- ++ echo /Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys/trustdb.gpg
- + trustdb=/Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys/trustdb.gpg
- + local 'error_message=no public keys for users found. run '\''git secret tell email@address'\''.'
- + [[ ! -f /Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys/trustdb.gpg ]]
- + local secrets_dir_keys
- ++ _get_secrets_dir_keys
- ++ _append_root_path .gitsecret/keys
- ++ local path=.gitsecret/keys
- ++ local root_path
- +++ _get_git_root_path
- +++ local result
- ++++ git rev-parse --show-toplevel
- +++ result=/Users/examp/gitsrc/jcreds-amazon
- +++ echo /Users/examp/gitsrc/jcreds-amazon
- ++ root_path=/Users/examp/gitsrc/jcreds-amazon
- ++ echo /Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys
- + secrets_dir_keys=/Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys
- + local keys_exist
- ++ gpg --homedir /Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys --no-permission-warning -n --list-keys
- + keys_exist='/Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys/pubring.gpg
- -------------------------------------------------------------
- pub rsa2048 2018-04-13 [SC]
- C024A1CE5041B0AAE2364BD37E88B250AF273140
- uid [ unknown] examp (no comment) <joshr@joshr.com>
- sub rsa2048 2018-04-13 [E]
- pub rsa2048 2018-04-16 [SC]
- 5C43BCCB38AC6A237DB7D912330F3E0D33CF057D
- uid [ unknown] examp <joshr@xl18.joshr.com>
- sub rsa2048 2018-04-16 [E]
- pub rsa2048 2018-04-16 [SC] [expires: 2020-04-15]
- B6BF8F16DE424C948FCA797DC9F65BB1D3C986D8
- uid [ unknown] examp <joshr@macpro.joshr.com>
- sub rsa2048 2018-04-16 [E] [expires: 2020-04-15]'
- + local exit_code=0
- + [[ 0 -ne 0 ]]
- + [[ -z /Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys/pubring.gpg
- -------------------------------------------------------------
- pub rsa2048 2018-04-13 [SC]
- C024A1CE5041B0AAE2364BD37E88B250AF273140
- uid [ unknown] examp (no comment) <joshr@joshr.com>
- sub rsa2048 2018-04-13 [E]
- pub rsa2048 2018-04-16 [SC]
- 5C43BCCB38AC6A237DB7D912330F3E0D33CF057D
- uid [ unknown] examp <joshr@xl18.joshr.com>
- sub rsa2048 2018-04-16 [E]
- pub rsa2048 2018-04-16 [SC] [expires: 2020-04-15]
- B6BF8F16DE424C948FCA797DC9F65BB1D3C986D8
- uid [ unknown] examp <joshr@macpro.joshr.com>
- sub rsa2048 2018-04-16 [E] [expires: 2020-04-15] ]]
- + _optional_clean 0 ''
- + local clean=0
- + local verbose=
- + [[ 0 -eq 1 ]]
- + local path_mappings
- ++ _get_secrets_dir_paths_mapping
- ++ _append_root_path .gitsecret/paths/mapping.cfg
- ++ local path=.gitsecret/paths/mapping.cfg
- ++ local root_path
- +++ _get_git_root_path
- +++ local result
- ++++ git rev-parse --show-toplevel
- +++ result=/Users/examp/gitsrc/jcreds-amazon
- +++ echo /Users/examp/gitsrc/jcreds-amazon
- ++ root_path=/Users/examp/gitsrc/jcreds-amazon
- ++ echo /Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg
- + path_mappings=/Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg
- + to_hide=()
- + local to_hide
- + read -r record
- + local filename
- ++ _get_record_filename config4.ini:
- ++ local record=config4.ini:
- ++ local filename
- +++ echo config4.ini:
- +++ awk -F: '{print $1}'
- ++ filename=config4.ini
- ++ echo config4.ini
- + filename=config4.ini
- + [[ ! -f config4.ini ]]
- + to_hide+=("$record")
- + read -r record
- + local filename
- ++ _get_record_filename config5.ini:
- ++ local record=config5.ini:
- ++ local filename
- +++ echo config5.ini:
- +++ awk -F: '{print $1}'
- ++ filename=config5.ini
- ++ echo config5.ini
- + filename=config5.ini
- + [[ ! -f config5.ini ]]
- + to_hide+=("$record")
- + read -r record
- + local filename
- ++ _get_record_filename 'test space.cfg'
- ++ local 'record=test space.cfg'
- ++ local filename
- +++ echo 'test space.cfg'
- +++ awk -F: '{print $1}'
- ++ filename='test space.cfg'
- ++ echo 'test space.cfg'
- + filename='test space.cfg'
- + [[ ! -f test space.cfg ]]
- + to_hide+=("$record")
- + read -r record
- + local filename
- ++ _get_record_filename config.ini
- ++ local record=config.ini
- ++ local filename
- +++ echo config.ini
- +++ awk -F: '{print $1}'
- ++ filename=config.ini
- ++ echo config.ini
- + filename=config.ini
- + [[ ! -f config.ini ]]
- + to_hide+=("$record")
- + read -r record
- + local filename
- ++ _get_record_filename config1.ini
- ++ local record=config1.ini
- ++ local filename
- +++ echo config1.ini
- +++ awk -F: '{print $1}'
- ++ filename=config1.ini
- ++ echo config1.ini
- + filename=config1.ini
- + [[ ! -f config1.ini ]]
- + to_hide+=("$record")
- + read -r record
- + local filename
- ++ _get_record_filename config2.ini
- ++ local record=config2.ini
- ++ local filename
- +++ echo config2.ini
- +++ awk -F: '{print $1}'
- ++ filename=config2.ini
- ++ echo config2.ini
- + filename=config2.ini
- + [[ ! -f config2.ini ]]
- + to_hide+=("$record")
- + read -r record
- + local filename
- ++ _get_record_filename config3.ini
- ++ local record=config3.ini
- ++ local filename
- +++ echo config3.ini
- +++ awk -F: '{print $1}'
- ++ filename=config3.ini
- ++ echo config3.ini
- + filename=config3.ini
- + [[ ! -f config3.ini ]]
- + to_hide+=("$record")
- + read -r record
- + local counter=0
- + for record in '"${to_hide[@]}"'
- + local filename
- + local fsdb_file_hash
- + local encrypted_filename
- ++ _get_record_filename config4.ini:
- ++ local record=config4.ini:
- ++ local filename
- +++ echo config4.ini:
- +++ awk -F: '{print $1}'
- ++ filename=config4.ini
- ++ echo config4.ini
- + filename=config4.ini
- ++ _get_record_hash config4.ini:
- ++ local record=config4.ini:
- ++ local hash
- +++ echo config4.ini:
- +++ awk -F: '{print $2}'
- ++ hash=
- ++ echo ''
- + fsdb_file_hash=
- ++ _get_encrypted_filename config4.ini
- ++ local filename
- +++ dirname config4.ini
- +++ basename config4.ini .secret
- ++ filename=./config4.ini
- ++ echo ./config4.ini.secret
- ++ sed -e 's#^\./##'
- + encrypted_filename=config4.ini.secret
- + [[ ! -f config4.ini ]]
- + local recipients
- ++ _get_recipients
- ++ _parse_keyring_users 's/.*<\(.*\)>.*/-r\1/p'
- ++ local 'sed_pattern=s/.*<\(.*\)>.*/-r\1/p'
- ++ local result
- ++ local secrets_dir_keys
- +++ _get_secrets_dir_keys
- +++ _append_root_path .gitsecret/keys
- +++ local path=.gitsecret/keys
- +++ local root_path
- ++++ _get_git_root_path
- ++++ local result
- +++++ git rev-parse --show-toplevel
- ++++ result=/Users/examp/gitsrc/jcreds-amazon
- ++++ echo /Users/examp/gitsrc/jcreds-amazon
- +++ root_path=/Users/examp/gitsrc/jcreds-amazon
- +++ echo /Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys
- ++ secrets_dir_keys=/Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys
- +++ gpg --homedir /Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys --no-permission-warning --list-public-keys --with-colon
- +++ sed -n 's/.*<\(.*\)>.*/-r\1/p'
- ++ result='-rexamp@joshr.com
- -rexamp@xl18.joshr.com
- -rexamp@macpro.joshr.com'
- ++ echo '-rexamp@joshr.com
- -rexamp@xl18.joshr.com
- -rexamp@macpro.joshr.com'
- + recipients='-rexamp@joshr.com
- -rexamp@xl18.joshr.com
- -rexamp@macpro.joshr.com'
- + local secrets_dir_keys
- ++ _get_secrets_dir_keys
- ++ _append_root_path .gitsecret/keys
- ++ local path=.gitsecret/keys
- ++ local root_path
- +++ _get_git_root_path
- +++ local result
- ++++ git rev-parse --show-toplevel
- +++ result=/Users/examp/gitsrc/jcreds-amazon
- +++ echo /Users/examp/gitsrc/jcreds-amazon
- ++ root_path=/Users/examp/gitsrc/jcreds-amazon
- ++ echo /Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys
- + secrets_dir_keys=/Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys
- + local input_path
- + local output_path
- ++ _append_root_path config4.ini
- ++ local path=config4.ini
- ++ local root_path
- +++ _get_git_root_path
- +++ local result
- ++++ git rev-parse --show-toplevel
- +++ result=/Users/examp/gitsrc/jcreds-amazon
- +++ echo /Users/examp/gitsrc/jcreds-amazon
- ++ root_path=/Users/examp/gitsrc/jcreds-amazon
- ++ echo /Users/examp/gitsrc/jcreds-amazon/config4.ini
- + input_path=/Users/examp/gitsrc/jcreds-amazon/config4.ini
- ++ _append_root_path config4.ini.secret
- ++ local path=config4.ini.secret
- ++ local root_path
- +++ _get_git_root_path
- +++ local result
- ++++ git rev-parse --show-toplevel
- +++ result=/Users/examp/gitsrc/jcreds-amazon
- +++ echo /Users/examp/gitsrc/jcreds-amazon
- ++ root_path=/Users/examp/gitsrc/jcreds-amazon
- ++ echo /Users/examp/gitsrc/jcreds-amazon/config4.ini.secret
- + output_path=/Users/examp/gitsrc/jcreds-amazon/config4.ini.secret
- ++ _get_file_hash /Users/examp/gitsrc/jcreds-amazon/config4.ini
- ++ local input_path=/Users/examp/gitsrc/jcreds-amazon/config4.ini
- ++ local checksum_local
- ++ local file_hash
- +++ _get_checksum_local
- +++ local 'checksum=_os_based __sha256'
- +++ echo '_os_based __sha256'
- ++ checksum_local='_os_based __sha256'
- +++ _os_based __sha256 /Users/examp/gitsrc/jcreds-amazon/config4.ini
- +++ case "$(uname -s)" in
- +++ gawk '{print $1}'
- ++++ uname -s
- +++ __sha256_osx /Users/examp/gitsrc/jcreds-amazon/config4.ini
- +++ /usr/bin/shasum -a256 /Users/examp/gitsrc/jcreds-amazon/config4.ini
- ++ file_hash=f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2
- ++ echo f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2
- + file_hash=f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2
- + [[ '' != \f\2\c\a\1\b\b\6\c\7\e\9\0\7\d\0\6\d\a\f\e\4\6\8\7\e\5\7\9\f\c\e\7\6\b\3\7\e\4\e\9\3\b\7\6\0\5\0\2\2\d\a\5\2\e\6\c\c\c\2\6\f\d\2 ]]
- + gpg --homedir /Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys --no-permission-warning --use-agent --yes --trust-model=always --encrypt -rjoshr@joshr.com -rjoshr@xl18.joshr.com -rjoshr@macpro.joshr.com -o /Users/joshr/gitsrc/jcreds-amazon/config4.ini.secret /Users/joshr/gitsrc/jcreds-amazon/config4.ini
- + local exit_code=0
- + [[ 0 -ne 0 ]]
- + local key=config4.ini
- + local hash=f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2
- + [[ 1 -gt 0 ]]
- + _optional_fsdb_update_hash config4.ini f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2
- + local key=config4.ini
- + local hash=f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2
- + local fsdb
- ++ _get_secrets_dir_paths_mapping
- ++ _append_root_path .gitsecret/paths/mapping.cfg
- ++ local path=.gitsecret/paths/mapping.cfg
- ++ local root_path
- +++ _get_git_root_path
- +++ local result
- ++++ git rev-parse --show-toplevel
- +++ result=/Users/examp/gitsrc/jcreds-amazon
- +++ echo /Users/examp/gitsrc/jcreds-amazon
- ++ root_path=/Users/examp/gitsrc/jcreds-amazon
- ++ echo /Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg
- + fsdb=/Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg
- + _gawk_inplace -v key=config4.ini -v hash=f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2 ''\''
- BEGIN { FS=":"; OFS=":"; }
- {
- if ( key == $1 )
- {
- print key,hash;
- }
- else
- {
- print $1,$2;
- }
- }
- '\''' /Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg
- + local 'parms=-v key=config4.ini -v hash=f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2 '\''
- BEGIN { FS=":"; OFS=":"; }
- {
- if ( key == $1 )
- {
- print key,hash;
- }
- else
- {
- print $1,$2;
- }
- }
- '\'' /Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg'
- + local dest_file
- ++ echo '-v key=config4.ini -v hash=f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2 '\''
- BEGIN { FS=":"; OFS=":"; }
- {
- if ( key == $1 )
- {
- print key,hash;
- }
- else
- {
- print $1,$2;
- }
- }
- '\'' /Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg'
- ++ gawk -v 'RS='\''' -v 'FS='\''' 'END{ gsub(/^\s+/,""); print $1 }'
- + dest_file=/Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg
- + _temporary_file
- ++ _os_based __temp_file
- ++ case "$(uname -s)" in
- +++ uname -s
- ++ __temp_file_osx
- ++ : /var/folders/_9/1yt1jp1s4w76wjj0bd7gbws000017w/T/
- ++ local filename
- +++ mktemp -t _gitsecrets_XXX
- ++ filename=/var/folders/_9/1yt1jp1s4w76wjj0bd7gbws000017w/T/_gitsecrets_XXX.EgRBN18p
- ++ echo /var/folders/_9/1yt1jp1s4w76wjj0bd7gbws000017w/T/_gitsecrets_XXX.EgRBN18p
- + filename=/var/folders/_9/1yt1jp1s4w76wjj0bd7gbws000017w/T/_gitsecrets_XXX.EgRBN18p
- + trap 'echo "cleaning up..."; rm -f "$filename";' EXIT
- + bash -c 'gawk -v key=config4.ini -v hash=f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2 '\''
- BEGIN { FS=":"; OFS=":"; }
- {
- if ( key == $1 )
- {
- print key,hash;
- }
- else
- {
- print $1,$2;
- }
- }
- '\'' /Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg'
- + mv /var/folders/_9/1yt1jp1s4w76wjj0bd7gbws000017w/T/_gitsecrets_XXX.EgRBN18p /Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg
- + counter=1
- + for record in '"${to_hide[@]}"'
- + local filename
- + local fsdb_file_hash
- + local encrypted_filename
- ++ _get_record_filename config5.ini:
- ++ local record=config5.ini:
- ++ local filename
- +++ echo config5.ini:
- +++ awk -F: '{print $1}'
- ++ filename=config5.ini
- ++ echo config5.ini
- + filename=config5.ini
- ++ _get_record_hash config5.ini:
- ++ local record=config5.ini:
- ++ local hash
- +++ echo config5.ini:
- +++ awk -F: '{print $2}'
- ++ hash=
- ++ echo ''
- + fsdb_file_hash=
- ++ _get_encrypted_filename config5.ini
- ++ local filename
- +++ dirname config5.ini
- +++ basename config5.ini .secret
- ++ filename=./config5.ini
- ++ echo ./config5.ini.secret
- ++ sed -e 's#^\./##'
- + encrypted_filename=config5.ini.secret
- + [[ ! -f config5.ini ]]
- + local recipients
- ++ _get_recipients
- ++ _parse_keyring_users 's/.*<\(.*\)>.*/-r\1/p'
- ++ local 'sed_pattern=s/.*<\(.*\)>.*/-r\1/p'
- ++ local result
- ++ local secrets_dir_keys
- +++ _get_secrets_dir_keys
- +++ _append_root_path .gitsecret/keys
- +++ local path=.gitsecret/keys
- +++ local root_path
- ++++ _get_git_root_path
- ++++ local result
- +++++ git rev-parse --show-toplevel
- ++++ result=/Users/examp/gitsrc/jcreds-amazon
- ++++ echo /Users/examp/gitsrc/jcreds-amazon
- +++ root_path=/Users/examp/gitsrc/jcreds-amazon
- +++ echo /Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys
- ++ secrets_dir_keys=/Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys
- +++ gpg --homedir /Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys --no-permission-warning --list-public-keys --with-colon
- +++ sed -n 's/.*<\(.*\)>.*/-r\1/p'
- ++ result='-rexamp@joshr.com
- -rexamp@xl18.joshr.com
- -rexamp@macpro.joshr.com'
- ++ echo '-rexamp@joshr.com
- -rexamp@xl18.joshr.com
- -rexamp@macpro.joshr.com'
- + recipients='-rexamp@joshr.com
- -rexamp@xl18.joshr.com
- -rexamp@macpro.joshr.com'
- + local secrets_dir_keys
- ++ _get_secrets_dir_keys
- ++ _append_root_path .gitsecret/keys
- ++ local path=.gitsecret/keys
- ++ local root_path
- +++ _get_git_root_path
- +++ local result
- ++++ git rev-parse --show-toplevel
- +++ result=/Users/examp/gitsrc/jcreds-amazon
- +++ echo /Users/examp/gitsrc/jcreds-amazon
- ++ root_path=/Users/examp/gitsrc/jcreds-amazon
- ++ echo /Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys
- + secrets_dir_keys=/Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys
- + local input_path
- + local output_path
- ++ _append_root_path config5.ini
- ++ local path=config5.ini
- ++ local root_path
- +++ _get_git_root_path
- +++ local result
- ++++ git rev-parse --show-toplevel
- +++ result=/Users/examp/gitsrc/jcreds-amazon
- +++ echo /Users/examp/gitsrc/jcreds-amazon
- ++ root_path=/Users/examp/gitsrc/jcreds-amazon
- ++ echo /Users/examp/gitsrc/jcreds-amazon/config5.ini
- + input_path=/Users/examp/gitsrc/jcreds-amazon/config5.ini
- ++ _append_root_path config5.ini.secret
- ++ local path=config5.ini.secret
- ++ local root_path
- +++ _get_git_root_path
- +++ local result
- ++++ git rev-parse --show-toplevel
- +++ result=/Users/examp/gitsrc/jcreds-amazon
- +++ echo /Users/examp/gitsrc/jcreds-amazon
- ++ root_path=/Users/examp/gitsrc/jcreds-amazon
- ++ echo /Users/examp/gitsrc/jcreds-amazon/config5.ini.secret
- + output_path=/Users/examp/gitsrc/jcreds-amazon/config5.ini.secret
- ++ _get_file_hash /Users/examp/gitsrc/jcreds-amazon/config5.ini
- ++ local input_path=/Users/examp/gitsrc/jcreds-amazon/config5.ini
- ++ local checksum_local
- ++ local file_hash
- +++ _get_checksum_local
- +++ local 'checksum=_os_based __sha256'
- +++ echo '_os_based __sha256'
- ++ checksum_local='_os_based __sha256'
- +++ _os_based __sha256 /Users/examp/gitsrc/jcreds-amazon/config5.ini
- +++ case "$(uname -s)" in
- +++ gawk '{print $1}'
- ++++ uname -s
- +++ __sha256_osx /Users/examp/gitsrc/jcreds-amazon/config5.ini
- +++ /usr/bin/shasum -a256 /Users/examp/gitsrc/jcreds-amazon/config5.ini
- ++ file_hash=f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2
- ++ echo f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2
- + file_hash=f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2
- + [[ '' != \f\2\c\a\1\b\b\6\c\7\e\9\0\7\d\0\6\d\a\f\e\4\6\8\7\e\5\7\9\f\c\e\7\6\b\3\7\e\4\e\9\3\b\7\6\0\5\0\2\2\d\a\5\2\e\6\c\c\c\2\6\f\d\2 ]]
- + gpg --homedir /Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys --no-permission-warning --use-agent --yes --trust-model=always --encrypt -rjoshr@joshr.com -rjoshr@xl18.joshr.com -rjoshr@macpro.joshr.com -o /Users/joshr/gitsrc/jcreds-amazon/config5.ini.secret /Users/joshr/gitsrc/jcreds-amazon/config5.ini
- + local exit_code=0
- + [[ 0 -ne 0 ]]
- + local key=config5.ini
- + local hash=f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2
- + [[ 1 -gt 0 ]]
- + _optional_fsdb_update_hash config5.ini f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2
- + local key=config5.ini
- + local hash=f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2
- + local fsdb
- ++ _get_secrets_dir_paths_mapping
- ++ _append_root_path .gitsecret/paths/mapping.cfg
- ++ local path=.gitsecret/paths/mapping.cfg
- ++ local root_path
- +++ _get_git_root_path
- +++ local result
- ++++ git rev-parse --show-toplevel
- +++ result=/Users/examp/gitsrc/jcreds-amazon
- +++ echo /Users/examp/gitsrc/jcreds-amazon
- ++ root_path=/Users/examp/gitsrc/jcreds-amazon
- ++ echo /Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg
- + fsdb=/Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg
- + _gawk_inplace -v key=config5.ini -v hash=f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2 ''\''
- BEGIN { FS=":"; OFS=":"; }
- {
- if ( key == $1 )
- {
- print key,hash;
- }
- else
- {
- print $1,$2;
- }
- }
- '\''' /Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg
- + local 'parms=-v key=config5.ini -v hash=f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2 '\''
- BEGIN { FS=":"; OFS=":"; }
- {
- if ( key == $1 )
- {
- print key,hash;
- }
- else
- {
- print $1,$2;
- }
- }
- '\'' /Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg'
- + local dest_file
- ++ echo '-v key=config5.ini -v hash=f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2 '\''
- BEGIN { FS=":"; OFS=":"; }
- {
- if ( key == $1 )
- {
- print key,hash;
- }
- else
- {
- print $1,$2;
- }
- }
- '\'' /Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg'
- ++ gawk -v 'RS='\''' -v 'FS='\''' 'END{ gsub(/^\s+/,""); print $1 }'
- + dest_file=/Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg
- + _temporary_file
- ++ _os_based __temp_file
- ++ case "$(uname -s)" in
- +++ uname -s
- ++ __temp_file_osx
- ++ : /var/folders/_9/1yt1jp1s4w76wjj0bd7gbws000017w/T/
- ++ local filename
- +++ mktemp -t _gitsecrets_XXX
- ++ filename=/var/folders/_9/1yt1jp1s4w76wjj0bd7gbws000017w/T/_gitsecrets_XXX.9xHozgyX
- ++ echo /var/folders/_9/1yt1jp1s4w76wjj0bd7gbws000017w/T/_gitsecrets_XXX.9xHozgyX
- + filename=/var/folders/_9/1yt1jp1s4w76wjj0bd7gbws000017w/T/_gitsecrets_XXX.9xHozgyX
- + trap 'echo "cleaning up..."; rm -f "$filename";' EXIT
- + bash -c 'gawk -v key=config5.ini -v hash=f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2 '\''
- BEGIN { FS=":"; OFS=":"; }
- {
- if ( key == $1 )
- {
- print key,hash;
- }
- else
- {
- print $1,$2;
- }
- }
- '\'' /Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg'
- + mv /var/folders/_9/1yt1jp1s4w76wjj0bd7gbws000017w/T/_gitsecrets_XXX.9xHozgyX /Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg
- + counter=2
- + for record in '"${to_hide[@]}"'
- + local filename
- + local fsdb_file_hash
- + local encrypted_filename
- ++ _get_record_filename 'test space.cfg'
- ++ local 'record=test space.cfg'
- ++ local filename
- +++ echo 'test space.cfg'
- +++ awk -F: '{print $1}'
- ++ filename='test space.cfg'
- ++ echo 'test space.cfg'
- + filename='test space.cfg'
- ++ _get_record_hash 'test space.cfg'
- ++ local 'record=test space.cfg'
- ++ local hash
- +++ echo 'test space.cfg'
- +++ awk -F: '{print $2}'
- ++ hash=
- ++ echo ''
- + fsdb_file_hash=
- ++ _get_encrypted_filename 'test space.cfg'
- ++ local filename
- +++ dirname 'test space.cfg'
- +++ basename 'test space.cfg' .secret
- ++ filename='./test space.cfg'
- ++ echo './test space.cfg.secret'
- ++ sed -e 's#^\./##'
- + encrypted_filename='test space.cfg.secret'
- + [[ ! -f test space.cfg ]]
- + local recipients
- ++ _get_recipients
- ++ _parse_keyring_users 's/.*<\(.*\)>.*/-r\1/p'
- ++ local 'sed_pattern=s/.*<\(.*\)>.*/-r\1/p'
- ++ local result
- ++ local secrets_dir_keys
- +++ _get_secrets_dir_keys
- +++ _append_root_path .gitsecret/keys
- +++ local path=.gitsecret/keys
- +++ local root_path
- ++++ _get_git_root_path
- ++++ local result
- +++++ git rev-parse --show-toplevel
- ++++ result=/Users/examp/gitsrc/jcreds-amazon
- ++++ echo /Users/examp/gitsrc/jcreds-amazon
- +++ root_path=/Users/examp/gitsrc/jcreds-amazon
- +++ echo /Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys
- ++ secrets_dir_keys=/Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys
- +++ gpg --homedir /Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys --no-permission-warning --list-public-keys --with-colon
- +++ sed -n 's/.*<\(.*\)>.*/-r\1/p'
- ++ result='-rexamp@joshr.com
- -rexamp@xl18.joshr.com
- -rexamp@macpro.joshr.com'
- ++ echo '-rexamp@joshr.com
- -rexamp@xl18.joshr.com
- -rexamp@macpro.joshr.com'
- + recipients='-rexamp@joshr.com
- -rexamp@xl18.joshr.com
- -rexamp@macpro.joshr.com'
- + local secrets_dir_keys
- ++ _get_secrets_dir_keys
- ++ _append_root_path .gitsecret/keys
- ++ local path=.gitsecret/keys
- ++ local root_path
- +++ _get_git_root_path
- +++ local result
- ++++ git rev-parse --show-toplevel
- +++ result=/Users/examp/gitsrc/jcreds-amazon
- +++ echo /Users/examp/gitsrc/jcreds-amazon
- ++ root_path=/Users/examp/gitsrc/jcreds-amazon
- ++ echo /Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys
- + secrets_dir_keys=/Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys
- + local input_path
- + local output_path
- ++ _append_root_path 'test space.cfg'
- ++ local 'path=test space.cfg'
- ++ local root_path
- +++ _get_git_root_path
- +++ local result
- ++++ git rev-parse --show-toplevel
- +++ result=/Users/examp/gitsrc/jcreds-amazon
- +++ echo /Users/examp/gitsrc/jcreds-amazon
- ++ root_path=/Users/examp/gitsrc/jcreds-amazon
- ++ echo '/Users/examp/gitsrc/jcreds-amazon/test space.cfg'
- + input_path='/Users/examp/gitsrc/jcreds-amazon/test space.cfg'
- ++ _append_root_path 'test space.cfg.secret'
- ++ local 'path=test space.cfg.secret'
- ++ local root_path
- +++ _get_git_root_path
- +++ local result
- ++++ git rev-parse --show-toplevel
- +++ result=/Users/examp/gitsrc/jcreds-amazon
- +++ echo /Users/examp/gitsrc/jcreds-amazon
- ++ root_path=/Users/examp/gitsrc/jcreds-amazon
- ++ echo '/Users/examp/gitsrc/jcreds-amazon/test space.cfg.secret'
- + output_path='/Users/examp/gitsrc/jcreds-amazon/test space.cfg.secret'
- ++ _get_file_hash '/Users/examp/gitsrc/jcreds-amazon/test space.cfg'
- ++ local 'input_path=/Users/examp/gitsrc/jcreds-amazon/test space.cfg'
- ++ local checksum_local
- ++ local file_hash
- +++ _get_checksum_local
- +++ local 'checksum=_os_based __sha256'
- +++ echo '_os_based __sha256'
- ++ checksum_local='_os_based __sha256'
- +++ _os_based __sha256 '/Users/examp/gitsrc/jcreds-amazon/test space.cfg'
- +++ case "$(uname -s)" in
- +++ gawk '{print $1}'
- ++++ uname -s
- +++ __sha256_osx '/Users/examp/gitsrc/jcreds-amazon/test space.cfg'
- +++ /usr/bin/shasum -a256 '/Users/examp/gitsrc/jcreds-amazon/test space.cfg'
- ++ file_hash=a1fff0ffefb9eace7230c24e50731f0a91c62f9cefdfe77121c2f607125dffae
- ++ echo a1fff0ffefb9eace7230c24e50731f0a91c62f9cefdfe77121c2f607125dffae
- + file_hash=a1fff0ffefb9eace7230c24e50731f0a91c62f9cefdfe77121c2f607125dffae
- + [[ '' != \a\1\f\f\f\0\f\f\e\f\b\9\e\a\c\e\7\2\3\0\c\2\4\e\5\0\7\3\1\f\0\a\9\1\c\6\2\f\9\c\e\f\d\f\e\7\7\1\2\1\c\2\f\6\0\7\1\2\5\d\f\f\a\e ]]
- + gpg --homedir /Users/examp/gitsrc/jcreds-amazon/.gitsecret/keys --no-permission-warning --use-agent --yes --trust-model=always --encrypt -rjoshr@joshr.com -rjoshr@xl18.joshr.com -rjoshr@macpro.joshr.com -o '/Users/joshr/gitsrc/jcreds-amazon/test space.cfg.secret' '/Users/joshr/gitsrc/jcreds-amazon/test space.cfg'
- + local exit_code=0
- + [[ 0 -ne 0 ]]
- + local 'key=test space.cfg'
- + local hash=a1fff0ffefb9eace7230c24e50731f0a91c62f9cefdfe77121c2f607125dffae
- + [[ 1 -gt 0 ]]
- + _optional_fsdb_update_hash 'test space.cfg' a1fff0ffefb9eace7230c24e50731f0a91c62f9cefdfe77121c2f607125dffae
- + local 'key=test space.cfg'
- + local hash=a1fff0ffefb9eace7230c24e50731f0a91c62f9cefdfe77121c2f607125dffae
- + local fsdb
- ++ _get_secrets_dir_paths_mapping
- ++ _append_root_path .gitsecret/paths/mapping.cfg
- ++ local path=.gitsecret/paths/mapping.cfg
- ++ local root_path
- +++ _get_git_root_path
- +++ local result
- ++++ git rev-parse --show-toplevel
- +++ result=/Users/examp/gitsrc/jcreds-amazon
- +++ echo /Users/examp/gitsrc/jcreds-amazon
- ++ root_path=/Users/examp/gitsrc/jcreds-amazon
- ++ echo /Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg
- + fsdb=/Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg
- + _gawk_inplace -v 'key=test space.cfg' -v hash=a1fff0ffefb9eace7230c24e50731f0a91c62f9cefdfe77121c2f607125dffae ''\''
- BEGIN { FS=":"; OFS=":"; }
- {
- if ( key == $1 )
- {
- print key,hash;
- }
- else
- {
- print $1,$2;
- }
- }
- '\''' /Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg
- + local 'parms=-v key=test space.cfg -v hash=a1fff0ffefb9eace7230c24e50731f0a91c62f9cefdfe77121c2f607125dffae '\''
- BEGIN { FS=":"; OFS=":"; }
- {
- if ( key == $1 )
- {
- print key,hash;
- }
- else
- {
- print $1,$2;
- }
- }
- '\'' /Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg'
- + local dest_file
- ++ echo '-v key=test space.cfg -v hash=a1fff0ffefb9eace7230c24e50731f0a91c62f9cefdfe77121c2f607125dffae '\''
- BEGIN { FS=":"; OFS=":"; }
- {
- if ( key == $1 )
- {
- print key,hash;
- }
- else
- {
- print $1,$2;
- }
- }
- '\'' /Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg'
- ++ gawk -v 'RS='\''' -v 'FS='\''' 'END{ gsub(/^\s+/,""); print $1 }'
- + dest_file=/Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg
- + _temporary_file
- ++ _os_based __temp_file
- ++ case "$(uname -s)" in
- +++ uname -s
- ++ __temp_file_osx
- ++ : /var/folders/_9/1yt1jp1s4w76wjj0bd7gbws000017w/T/
- ++ local filename
- +++ mktemp -t _gitsecrets_XXX
- ++ filename=/var/folders/_9/1yt1jp1s4w76wjj0bd7gbws000017w/T/_gitsecrets_XXX.MBygNoce
- ++ echo /var/folders/_9/1yt1jp1s4w76wjj0bd7gbws000017w/T/_gitsecrets_XXX.MBygNoce
- + filename=/var/folders/_9/1yt1jp1s4w76wjj0bd7gbws000017w/T/_gitsecrets_XXX.MBygNoce
- + trap 'echo "cleaning up..."; rm -f "$filename";' EXIT
- + bash -c 'gawk -v key=test space.cfg -v hash=a1fff0ffefb9eace7230c24e50731f0a91c62f9cefdfe77121c2f607125dffae '\''
- BEGIN { FS=":"; OFS=":"; }
- {
- if ( key == $1 )
- {
- print key,hash;
- }
- else
- {
- print $1,$2;
- }
- }
- '\'' /Users/examp/gitsrc/jcreds-amazon/.gitsecret/paths/mapping.cfg'
- gawk: cmd. line:1: space.cfg
- gawk: cmd. line:1: ^ syntax error
- + echo 'cleaning up...'
- cleaning up...
- + rm -f /var/folders/_9/1yt1jp1s4w76wjj0bd7gbws000017w/T/_gitsecrets_XXX.MBygNoce
Add Comment
Please, Sign In to add comment