Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion bash-functions
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
function chcreds() {
local tmpfile
tmpfile=$(mktemp)
if oscreds "$@" > "$tmpfile" 2>/dev/null; then
# Ensure GPG pinentry can use the current tty for passphrase prompting
# and forward diagnostics to the terminal instead of hiding them.
export GPG_TTY=$(tty)
if oscreds "$@" > "$tmpfile" 2>/dev/tty; then
source "$tmpfile"
rm "$tmpfile"
echo "Credentials loaded for $OS_CRED"
Expand Down