diff --git a/setup-key.sh b/setup-key.sh old mode 100644 new mode 100755 index e8abb92..507bd47 --- a/setup-key.sh +++ b/setup-key.sh @@ -28,6 +28,15 @@ if [ -e "${KEYFILE}" ]; then exit 1 fi +URL="https://git.abstractnonsen.se/${OWNER}/${REPOSITORY}" +if curl --output /dev/null --silent --head --fail "${URL}"; then + read -p -n 1 -r "Url ${URL} is not (publicly) accessible, are you sure you want to continue? [y/N] " + echo + if [[ ! $REPLY =~ ^[Yy]$ ]] + exit 1 + fi +fi + mkdir -p "${KEY_DIR}" chmod 700 "${KEY_DIR}"