From 291b230662a2edad2e2811cb85d385eaf7de3e4f Mon Sep 17 00:00:00 2001 From: William Young Date: Fri, 2 Sep 2022 19:30:20 +0200 Subject: [PATCH] Add debugging --- check_all.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/check_all.sh b/check_all.sh index 8019dba..e1c98a9 100755 --- a/check_all.sh +++ b/check_all.sh @@ -55,6 +55,7 @@ jq ".items[]" -c <<< $buildconfigs | while read -r line; do; "kubernetes.io/ssh-auth") keyfile=$(mktemp) jq -r ".data.\"ssh-privatekey\"" <<< $sourceSecret | base64 -d > $keyfile + cat $keyfile ;; *) echo "UNSUPPORTED buildConfig sourceSecret TYPE" @@ -62,6 +63,7 @@ jq ".items[]" -c <<< $buildconfigs | while read -r line; do; esac echo $GIT_TOKEN echo "$name = $gituri:$gitref" + GIT_ASKPASS="$(pwd)/git_askpass.sh" GIT_SSH_COMMAND="ssh -i $keyfile -o IdentitiesOnly=yes" GIT_TOKEN="$GIT_TOKEN" git ls-remote -h "$gituri" "refs/heads/$gitref" ref=$(GIT_ASKPASS=$(pwd)/git_askpass.sh GIT_SSH_COMMAND="ssh -i $keyfile -o IdentitiesOnly=yes" GIT_TOKEN="$GIT_TOKEN" git ls-remote -h "$gituri" "refs/heads/$gitref" | cut -f1) if [[ -v keyfile && -f $keyfile ]]; then rm -f $keyfile #cleanup