diff --git a/src/_utils/_git_secret_tools.sh b/src/_utils/_git_secret_tools.sh index 9606eaa0..1546cc5e 100644 --- a/src/_utils/_git_secret_tools.sh +++ b/src/_utils/_git_secret_tools.sh @@ -538,7 +538,7 @@ function _user_required { local trustdb trustdb=$(_get_secrets_dir_keys_trustdb) - local error_message="no users found. run 'git secret tell'." + local error_message="no permitted users found. run 'git secret tell email@address'." if [[ ! -f "$trustdb" ]]; then _abort "$error_message" fi @@ -548,6 +548,10 @@ function _user_required { local keys_exist keys_exist=$($gpg_local -n --list-keys) + local exit_code=$? + if [[ exit_code -ne 0 ]]; then + _abort "unable to list public keys in gpg: exit code $exit_code" + fi if [[ -z "$keys_exist" ]]; then _abort "$error_message" fi diff --git a/src/commands/git_secret_reveal.sh b/src/commands/git_secret_reveal.sh index 82e04f9d..633e14eb 100644 --- a/src/commands/git_secret_reveal.sh +++ b/src/commands/git_secret_reveal.sh @@ -43,7 +43,7 @@ function reveal { _decrypt "$path" "1" "$force" "$homedir" "$passphrase" if [[ ! -f "$path" ]]; then - _abort "cannot find decrypted version of file: $filename" + _abort "cannot find decrypted version of file: $filename" fi counter=$((counter+1))