summaryrefslogtreecommitdiff
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
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>
-rwxr-xr-xgitea-mirror/gitea-mirror6
-rwxr-xr-xgithub-mirror/github-mirror6
2 files changed, 8 insertions, 4 deletions
diff --git a/gitea-mirror/gitea-mirror b/gitea-mirror/gitea-mirror
index 527df11..0c39975 100755
--- a/gitea-mirror/gitea-mirror
+++ b/gitea-mirror/gitea-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 gitea.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/antarus/gitea-mirror/gentoo-gitea.ssh.priv}
-export GIT_SSH=./gitea-ssh-wrapper
+export GIT_SSH=$(dirname "$(readlink -f "$0")")/gitea-ssh-wrapper
for target in ${targets}; do
# --force because someone may accidentally push into the mirror
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