summaryrefslogtreecommitdiffstatshomepage
path: root/gnupg/.config/profile.d/20-ssh.sh
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2023-03-08 16:36:45 -0600
committerToby Vincent <tobyv13@gmail.com>2023-03-08 16:36:45 -0600
commitc7198aaab1152aaae0e85a8dd2ac0263416bf982 (patch)
tree97ff5bb881f3b8f9c6e0bd8d94cc318505a71080 /gnupg/.config/profile.d/20-ssh.sh
parentf9e4de13aeec5932c35d821610e5656a59c05516 (diff)
fix(gnupg): seperate gpg and ssh configs
Diffstat (limited to 'gnupg/.config/profile.d/20-ssh.sh')
-rw-r--r--gnupg/.config/profile.d/20-ssh.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/gnupg/.config/profile.d/20-ssh.sh b/gnupg/.config/profile.d/20-ssh.sh
new file mode 100644
index 0000000..6571e6d
--- /dev/null
+++ b/gnupg/.config/profile.d/20-ssh.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+unset SSH_AGENT_PID
+if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
+ SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
+ export SSH_AUTH_SOCK
+fi