#!/bin/sh
# *******************************************************
# THIS FILE WAS AUTO-GENERATED BY ATLASSIAN BITBUCKET.
# IT CONTAINS NO USER-SERVICEABLE PARTS.
# *******************************************************
#
# Wrapper script to run SCM operations over SSH using a custom SSH private key.
#

export SSH_COMMON_FLAGS="-C -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o UserKnownHostsFile=/dev/null"

if [ "${STASH_SSH_KEY}x" = "x" ]; then
    exec "$STASH_SSH_EXEC" $SSH_COMMON_FLAGS $@
else
    exec "$STASH_SSH_EXEC" -i "$STASH_SSH_KEY" $SSH_COMMON_FLAGS $@
fi