From b85e61f3a54f0b54dee6303bee4607b8ef512ab0 Mon Sep 17 00:00:00 2001 From: belliash Date: Mon, 9 Jan 2012 11:42:56 +0100 Subject: [PATCH] implement makeSshWrapper() --- libraries/repositories | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/libraries/repositories b/libraries/repositories index 30f9a76..8f184e0 100644 --- a/libraries/repositories +++ b/libraries/repositories @@ -57,3 +57,16 @@ function checkoutSubversion() { fi return 0 } + +#------------------------------------------------------------------------------- +# Creates SSH Wrapper for use with unknown hosts (requires key authentication) +#------------------------------------------------------------------------------- +function makeSshWrapper() { + echo "#!/bin/bash" > ${BINDIR}/ssh_wrapper.sh + echo "exec ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \ + \"\$@\"" >> ${BINDIR}/ssh_wrapper.sh + chmod +x ${BINDIR}/ssh_wrapper.sh || return 1 + export GIT_SSH="${BINDIR}/ssh_wrapper.sh" + export SVN_SSH="${BINDIR}/ssh_wrapper.sh" + return 0 +}