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 +}