diff options
author | Matthew Lemon <y@yulqen.org> | 2023-09-30 16:22:25 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2023-09-30 16:22:25 +0100 |
commit | fa940542283f7ee296ea62aa6132d5d52499f828 (patch) | |
tree | 68da927fa3b068bce0f838642d3da8cf351805f0 /bashrc | |
parent | 2dfae1a24a2dd780fbddbfdaf995696a4a97eee7 (diff) |
Switches off gpg agent for ssh and uses ssh agent
Diffstat (limited to 'bashrc')
-rw-r--r-- | bashrc | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -88,9 +88,16 @@ source /usr/share/fzf/completion.bash # gpg export GPG_TTY="$(tty)" -export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" gpgconf --launch gpg-agent +# ssh - from https://wiki.archlinux.org/title/SSH_keys#SSH_agents +if ! pgrep -u "$USER" ssh-agent > /dev/null; then + ssh-agent -t 1h > "$XDG_RUNTIME_DIR/ssh-agent.env" +fi +if [[ ! -f "$SSH_AUTH_SOCK" ]]; then + source "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null +fi + # bind '"\C-r": "\C-x1\e^\er"' # bind -x '"\C-x1": __fzf_history'; |