mirror of
https://github.com/shokinn/.files.git
synced 2025-01-18 21:22:25 +00:00
add gpg agent config fot tty passphrase entry
This commit is contained in:
parent
f05cc4561e
commit
ef7339743e
|
@ -131,6 +131,9 @@ dotfiles:
|
||||||
f_commonfunc:
|
f_commonfunc:
|
||||||
dst: ~/.commonfunc
|
dst: ~/.commonfunc
|
||||||
src: commonfunc
|
src: commonfunc
|
||||||
|
f_gpgagent:
|
||||||
|
dst: ~/.gnupg/gpg-agent.conf
|
||||||
|
src: gnupg/gpg-agent.conf
|
||||||
profiles:
|
profiles:
|
||||||
AINCRAD:
|
AINCRAD:
|
||||||
dotfiles:
|
dotfiles:
|
||||||
|
@ -252,6 +255,7 @@ profiles:
|
||||||
- f_wslenablehypervforwarding
|
- f_wslenablehypervforwarding
|
||||||
- f_wslshowhypervforwarding
|
- f_wslshowhypervforwarding
|
||||||
- f_commonfunc
|
- f_commonfunc
|
||||||
|
- f_gpgagent
|
||||||
workspace:
|
workspace:
|
||||||
dotfiles:
|
dotfiles:
|
||||||
- d_fonts
|
- d_fonts
|
||||||
|
|
5
dotfiles/gnupg/gpg-agent.conf
Normal file
5
dotfiles/gnupg/gpg-agent.conf
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#
|
||||||
|
# {{@@ header() @@}}
|
||||||
|
#
|
||||||
|
|
||||||
|
pinentry-program /usr/bin/pinentry-tty
|
|
@ -30,14 +30,18 @@ if [ $? -ne 0 ]; then
|
||||||
(setsid nohup socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:{{@@ env['HOME'] @@}}/.ssh/wsl2-ssh-pageant.exe >/dev/null 2>&1 &)
|
(setsid nohup socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:{{@@ env['HOME'] @@}}/.ssh/wsl2-ssh-pageant.exe >/dev/null 2>&1 &)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Currently not used
|
||||||
# Connect to windows gpg agent
|
# Connect to windows gpg agent
|
||||||
# https://github.com/BlackReloaded/wsl2-ssh-pageant
|
# https://github.com/BlackReloaded/wsl2-ssh-pageant
|
||||||
export GPG_AGENT_SOCK={{@@ env['HOME'] @@}}/.gnupg/S.gpg-agent
|
# export GPG_AGENT_SOCK={{@@ env['HOME'] @@}}/.gnupg/S.gpg-agent
|
||||||
ss -a | grep -q $GPG_AGENT_SOCK
|
# ss -a | grep -q $GPG_AGENT_SOCK
|
||||||
if [ $? -ne 0 ]; then
|
# if [ $? -ne 0 ]; then
|
||||||
rm -rf $GPG_AGENT_SOCK
|
# rm -rf $GPG_AGENT_SOCK
|
||||||
(setsid nohup socat UNIX-LISTEN:$GPG_AGENT_SOCK,fork EXEC:"{{@@ env['HOME'] @@}}/.ssh/wsl2-ssh-pageant.exe --gpg S.gpg-agent" >/dev/null 2>&1 &)
|
# (setsid nohup socat UNIX-LISTEN:$GPG_AGENT_SOCK,fork EXEC:"{{@@ env['HOME'] @@}}/.ssh/wsl2-ssh-pageant.exe --gpg S.gpg-agent" >/dev/null 2>&1 &)
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
|
# Set GPG_TTY to enable passphrase entry via tty
|
||||||
|
export GPG_TTY=$(tty)
|
||||||
|
|
||||||
# X410 (Windows X11 Server)
|
# X410 (Windows X11 Server)
|
||||||
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0
|
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0
|
||||||
|
|
Loading…
Reference in a new issue