From 26d5ed380e1b6e5a5f61a34c463d75d75865000e Mon Sep 17 00:00:00 2001 From: Xian Wang Date: Mon, 3 May 2021 11:36:35 -0400 Subject: add fix and skip gpg-agent for servers --- install.conf.yaml | 4 ++-- zshrc | 16 +++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/install.conf.yaml b/install.conf.yaml index 1531d8a..ca34495 100644 --- a/install.conf.yaml +++ b/install.conf.yaml @@ -8,8 +8,8 @@ - ~/.cache - ~/.config - create: - ~/.gnupg: - mode: 0700 + ~/.gnupg: + mode: 0700 - shell: - sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" diff --git a/zshrc b/zshrc index 80dfa4c..263f0b1 100644 --- a/zshrc +++ b/zshrc @@ -68,7 +68,7 @@ ZSH_THEME="jnrowe" # Custom plugins may be added to $ZSH_CUSTOM/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. -plugins=(git) +plugins=(git pass) source $ZSH/oh-my-zsh.sh @@ -95,12 +95,14 @@ export PATH="$HOME/bin:$PATH" export PATH="$HOME/.local/bin:$PATH" export PATH="/usr/lib/distcc/bin:$PATH" -export GPG_TTY="$(tty)" -export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) -gpgconf --kill gpg-agent -gpgconf --launch gpg-agent -gpg-connect-agent updatestartuptty /bye > /dev/null -gpg-connect-agent "scd serialno" "learn --force" /bye > /dev/null +if [ ! -f $HOME/server ]; then + export GPG_TTY="$(tty)" + export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) + gpgconf --kill gpg-agent + gpgconf --launch gpg-agent + gpg-connect-agent updatestartuptty /bye > /dev/null + gpg-connect-agent "scd serialno" "learn --force" /bye > /dev/null +fi # Set personal aliases, overriding those provided by oh-my-zsh libs, # plugins, and themes. Aliases can be placed here, though oh-my-zsh -- cgit v1.2.3