From 17b3388b5c4d9d56976f8d3bf1e6658b9f08081a Mon Sep 17 00:00:00 2001 From: Martin Gruber Date: Sun, 15 Sep 2024 22:36:59 +0200 Subject: [PATCH] Add pseudo credentials to continue on clone fail --- clone_and_run_tests.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clone_and_run_tests.sh b/clone_and_run_tests.sh index d590bf1..48d0630 100755 --- a/clone_and_run_tests.sh +++ b/clone_and_run_tests.sh @@ -42,7 +42,9 @@ REPOSITORY_DIR="${CWD}/${PROJECT_NAME}" debug_echo "Clone Repository into ${REPOSITORY_DIR}" if [[ $PROJECT_URL == http* ]] then - git clone "${PROJECT_URL}" "${REPOSITORY_DIR}" + # Add pseudo credentials to avoid git asking for username and password + PROJECT_URL_AUTH=$(echo $PROJECT_URL | sed "s/:\/\//:\/\/foo:foo@/g") + git clone "${PROJECT_URL_AUTH}" "${REPOSITORY_DIR}" if [[ -n "$PROJECT_HASH" ]]; then cd "${REPOSITORY_DIR}" || exit 1 git reset --hard "${PROJECT_HASH}" || exit 1