Use the ssh-agent service
This commit is contained in:
parent
f16a62dcd5
commit
228844e6db
1 changed files with 2 additions and 6 deletions
|
@ -33,12 +33,8 @@ if [ -f "/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# SSH agent
|
# SSH agent
|
||||||
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
|
# Enable it using `systemctl enable --user ssh-agent.service`
|
||||||
ssh-agent -t 1h > "$XDG_RUNTIME_DIR/ssh-agent.env"
|
[ -S "$XDG_RUNTIME_DIR/ssh-agent.socket" ] && export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
|
||||||
fi
|
|
||||||
if [[ ! -f "$SSH_AUTH_SOCK" ]]; then
|
|
||||||
source "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Aliases
|
# Aliases
|
||||||
[ -f "$MY_CONFIG/.aliases" ] && . "$MY_CONFIG/.aliases"
|
[ -f "$MY_CONFIG/.aliases" ] && . "$MY_CONFIG/.aliases"
|
||||||
|
|
Loading…
Reference in a new issue