git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
path: root/.gitconfig
diff options
context:
space:
mode:
authorH. P. <coding _æ_ lirion.de> 2024-07-14 12:15:04 +0200
committerH. P. <coding _æ_ lirion.de> 2024-07-14 12:15:04 +0200
commit00f87081a3ba50b48dc3cebfaa3c804e805120b0 (patch)
tree3a080954f961a6284e0ef0f616ba11c8fd87620f /.gitconfig
parent574bbc70cc4282baee11a0548f0bb3d9510ddee9 (diff)
downloaddotfiles-00f87081a3ba50b48dc3cebfaa3c804e805120b0.tar.bz2
add git-prompt to ignore list
Diffstat (limited to '.gitconfig')
0 files changed, 0 insertions, 0 deletions
ith-gpg')
-rwxr-xr-xbin/ssh-with-gpg20
1 files changed, 20 insertions, 0 deletions
diff --git a/bin/ssh-with-gpg b/bin/ssh-with-gpg
new file mode 100755
index 0000000..bd5a61f
--- /dev/null
+++ b/bin/ssh-with-gpg
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+# THIS IS A DRAFT FOR TESTING. IF YOU WANT TO USE THIS, REMOVE OR COMMENT THE
+# FOLLOWING LINE:
+exit 0
+
+if [ -z "$1" ];then
+ printf "USAGE: %b TARGET [OPTIONS...]\\n" "$(basename "$0")" >&2
+ exit 1
+fi
+
+TGT="$1"
+
+REMUID="$(ssh "$TGT" "id -u")"
+if [ -z "$REMUID" ];then
+ printf "Cannot fetch user id from %b.\\n" "$TGT" >&2
+ exit 2
+fi
+
+ssh -R "/run/user/$(id -u)/gnupg/S.dirmngr":"/run/user/${REMUID}/gnupg/S.dirmngr" -o "StreamLocalBindUnlink=yes"