From d5d8aee71b3069d2b4ba71fa63060dbdd3b37cc8 Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Mon, 15 Jun 2020 15:06:40 -0500 Subject: [PATCH] gpg as ssh key + fix ced --- dot_local/scripts/zsh/aliases.zsh | 8 ++++++++ private_dot_gnupg/private_sshcontrol | 12 ++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 private_dot_gnupg/private_sshcontrol diff --git a/dot_local/scripts/zsh/aliases.zsh b/dot_local/scripts/zsh/aliases.zsh index 2d6a867..693e05a 100644 --- a/dot_local/scripts/zsh/aliases.zsh +++ b/dot_local/scripts/zsh/aliases.zsh @@ -17,6 +17,14 @@ function ced() { echo "nah" return;; esac + # if the file exists but not in chezmoi + else + chezmoi source-path $1 > /dev/null + result=$? + if [ $result -ne 0 ]; then + echo "file doesn't exist in chezmoi.. adding" + chezmoi add $1 + fi fi chezmoi edit $1 diff --git a/private_dot_gnupg/private_sshcontrol b/private_dot_gnupg/private_sshcontrol new file mode 100644 index 0000000..57ca76d --- /dev/null +++ b/private_dot_gnupg/private_sshcontrol @@ -0,0 +1,12 @@ +# List of allowed ssh keys. Only keys present in this file are used +# in the SSH protocol. The ssh-add tool may add new entries to this +# file to enable them; you may also add them manually. Comment +# lines, like this one, as well as empty lines are ignored. Lines do +# have a certain length limit but this is not serious limitation as +# the format of the entries is fixed and checked by gpg-agent. A +# non-comment line starts with optional white spaces, followed by the +# keygrip of the key given as 40 hex digits, optionally followed by a +# caching TTL in seconds, and another optional field for arbitrary +# flags. Prepend the keygrip with an '!' mark to disable it. + +C66893BBE79AC07D85A60FABB208B2916EE9B504