]> git.sev.monster Git - dotfiles.git/commitdiff
more gpg stuff
authorsev <git@sev.monster>
Wed, 14 Oct 2020 04:26:29 +0000 (23:26 -0500)
committersev <git@sev.monster>
Fri, 5 Apr 2024 21:27:40 +0000 (16:27 -0500)
revert pointless gpg-agent.conf comments
update pinentry config to point to user-local bin
add pinentry script to auto-pick pinentry like Debian, but portable
add sshcontrol

bin/pinentry [new file with mode: 0755]
gpg/gpg-agent.conf
gpg/sshcontrol [new file with mode: 0644]

diff --git a/bin/pinentry b/bin/pinentry
new file mode 100755 (executable)
index 0000000..7b83ff5
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+# https://kevinlocke.name/bits/2019/07/31/prefer-terminal-for-gpg-pinentry
+
+set -Ce
+graphics="gtk-2 gtk qt x11 gnome"
+tty="curses tty"
+case "${PINENTRY_USER_DATA-}" in
+       *USE_TTY=1*) list="$tty $graphics";;
+       *)           list="$graphics $tty";;
+esac
+
+for x in $list; do
+       p=which "pinentry-$x" 2>/dev/null
+       if [ $? = 0 ]; then
+               exec "$p" "$@"
+       fi
+done
+
+echo "No pinentry program found" >&2
index 513e54c58c0100878efbe3f423c68727b6b45fbd..80751004980615c66a2438610b8686f9d0f9629b 100644 (file)
@@ -1,4 +1,2 @@
-# support ssh with gpg-agent
 enable-ssh-support
 enable-ssh-support
-# try to use X11 pinentry if possible
-pinentry-program /usr/bin/pinentry-x11
+pinentry-program ~/bin/pinentry
diff --git a/gpg/sshcontrol b/gpg/sshcontrol
new file mode 100644 (file)
index 0000000..0da20a5
--- /dev/null
@@ -0,0 +1 @@
+0C19EB483691C8F2F85E0F00A2DA56C990E448DE
This page took 1.095246 seconds and 4 git commands to generate.