From 4d5a312346f2cf7e67f90c4a905e35b1e382743f Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Sat, 21 Aug 2021 05:54:04 +0200 Subject: [PATCH] Deal with too wild rule for SSH keys. The rule was too broad and I couldn't make it and the other rules work consistently. Go with less broad rules but with some duplication. --- .ssh/config.d/20_gitlab_fdo | 2 +- .ssh/config.d/20_gitlab_toptal | 2 +- Makefile | 13 +++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.ssh/config.d/20_gitlab_fdo b/.ssh/config.d/20_gitlab_fdo index 834ef6d..3236dd0 100644 --- a/.ssh/config.d/20_gitlab_fdo +++ b/.ssh/config.d/20_gitlab_fdo @@ -4,5 +4,5 @@ Host gitlab.freedesktop.org User git -IdentityFile ~/.ssh/gitlab_fdo +IdentityFile ~/.ssh/gitlab_fdo_ed25519 diff --git a/.ssh/config.d/20_gitlab_toptal b/.ssh/config.d/20_gitlab_toptal index 76e919b..5baf9be 100644 --- a/.ssh/config.d/20_gitlab_toptal +++ b/.ssh/config.d/20_gitlab_toptal @@ -4,5 +4,5 @@ Host git.toptal.com User git -IdentityFile ~/.ssh/gitlab_toptal +IdentityFile ~/.ssh/gitlab_toptal_ed25519 diff --git a/Makefile b/Makefile index dd643af..70209c2 100644 --- a/Makefile +++ b/Makefile @@ -6,8 +6,8 @@ mkd = mkdir -p $$(dirname $@) .PHONY: all all: .ssh/gitlab_ed25519 -all: .ssh/gitlab_fdo -all: .ssh/gitlab_toptal +all: .ssh/gitlab_fdo_ed25519 +all: .ssh/gitlab_toptal_ed25519 all: .ssh/github_ed25519 all: .ssh/shore_ecdsa all: .ssh/shore_ed25519 @@ -15,14 +15,15 @@ all: .ssh/shore_rsa all: .ssh/smile_ed25519 all: .ssh/smile_rsa -.ssh/%: Documents/Database.kdbx +.ssh/%_rsa: Documents/Database.kdbx $(mkd) ph show --field Notes "SSH/$$(basename '$@')" > '$@' chmod 600 '$@' -# Disable the implicit rule above so that other files under .ssh/ will be -# created using an explicit rule. -.ssh/%: Documents/Database.kdbx +.ssh/%_ed25519: Documents/Database.kdbx + $(mkd) + ph show --field Notes "SSH/$$(basename '$@')" > '$@' + chmod 600 '$@' all: .config/pythonrc.py .config/pythonrc.py: -- GitLab