aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2015-02-15 13:38:43 +0100
committerDavid Runge <dave@sleepmap.de>2015-02-15 13:38:43 +0100
commit435095ba31a816fece797713396df98ac51dc2e9 (patch)
treef1e222ed1fafacae7ffd2810417301f5976f2c26
parent17fd9e6257c8fe351623b95d85bb3f6133682c41 (diff)
downloaddotfiles-435095ba31a816fece797713396df98ac51dc2e9.tar.gz
dotfiles-435095ba31a816fece797713396df98ac51dc2e9.tar.bz2
dotfiles-435095ba31a816fece797713396df98ac51dc2e9.tar.xz
dotfiles-435095ba31a816fece797713396df98ac51dc2e9.zip
export.zsh: Add export for GnuPG started as daemon on demand and emulating ssh-agent.
-rw-r--r--.zsh.after/export.zsh10
-rw-r--r--.zsh.before/keychain.zsh3
2 files changed, 10 insertions, 3 deletions
diff --git a/.zsh.after/export.zsh b/.zsh.after/export.zsh
index 1c1453d..6086d1b 100644
--- a/.zsh.after/export.zsh
+++ b/.zsh.after/export.zsh
@@ -27,3 +27,13 @@ export _JAVA_OPTIONS='-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndF
# Java non-reparenting windows
_JAVA_AWT_WM_NONREPARENTING=1; export _JAVA_AWT_WM_NONREPARENTING
+
+# GnuPG
+export GPG_TTY=$(tty)
+
+# ssh-agent setting for use with gpg-agent
+unset SSH_AGENT_PID
+if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
+ export SSH_AUTH_SOCK="${HOME}/.gnupg/S.gpg-agent.ssh"
+fi
+
diff --git a/.zsh.before/keychain.zsh b/.zsh.before/keychain.zsh
deleted file mode 100644
index 5b05bcb..0000000
--- a/.zsh.before/keychain.zsh
+++ /dev/null
@@ -1,3 +0,0 @@
-if [ -f /usr/bin/keychain ];then
- eval $(keychain --eval --agents gpg,ssh -Q --quiet ~/.ssh/id_rsa F5A1A949 --ignore-missing --nogui )
-fi