aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2020-12-06 21:04:14 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2020-12-06 21:04:14 -0800
commit6c33b3875b163e5f567e8ba7ca73e0c1ffaae9f5 (patch)
tree1d6b71c75fdda4f33a237879320f6d3480c37a6a /github-mirror
parentgithub-mirror: kex/cipher/mac override no longer needed (diff)
downloadgithooks-6c33b3875b163e5f567e8ba7ca73e0c1ffaae9f5.tar.gz
githooks-6c33b3875b163e5f567e8ba7ca73e0c1ffaae9f5.tar.bz2
githooks-6c33b3875b163e5f567e8ba7ca73e0c1ffaae9f5.zip
*mirror: start to fix GIT_SSH_KEY messgithooks-20201207T050414Z
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'github-mirror')
-rwxr-xr-xgithub-mirror/github-mirror6
1 files changed, 4 insertions, 2 deletions
diff --git a/github-mirror/github-mirror b/github-mirror/github-mirror
index 9b048e1..1f71697 100755
--- a/github-mirror/github-mirror
+++ b/github-mirror/github-mirror
@@ -15,9 +15,11 @@ fi
targets=$(git config --get gentoo.mirror.url)
[ -z "${targets}" ] && exit 0
-export GIT_SSH_KEY=$(git config --get gentoo.mirror.pubkey)
+[ -z "${GIT_SSH_KEY}" ] && export GIT_SSH_KEY=$(git config --get github.mirror.pubkey)
+[ -z "${GIT_SSH_KEY}" ] && export GIT_SSH_KEY=$(git config --get gentoo.mirror.pubkey)
+# TODO: fix this into version control!
: ${GIT_SSH_KEY:=/home/mgorny/github-mirror/gentoo_github_id_rsa}
-export GIT_SSH=/home/mgorny/github-mirror/github-ssh-wrapper
+export GIT_SSH=$(dirname "$(readlink -f "$0")")/github-ssh-wrapper
for target in ${targets}; do
# --force because someone may accidentally push into the mirror