File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,10 +36,17 @@ setup_repo() {
3636 else
3737 if [[ ! -d " $PWD /bitbots_main" ]]; then
3838 echo " Cloning repository bitbots_main..."
39- # Try to clone via SSH first, fall back to HTTPS if that fails
39+ # Try to clone via SSH first. If it fails, warn and ask user how to proceed.
4040 if ! git clone " $REPO_URL_SSH " ; then
41- echo " SSH clone failed, trying HTTPS..."
42- git clone " $REPO_URL_HTTPS "
41+ echo " SSH clone failed. This may mean your SSH keys are not set up for GitHub."
42+ echo " See: https://docs.github.com/en/authentication/connecting-to-github-with-ssh"
43+ if ask_question " Do you want to continue with an HTTPS clone instead of fixing SSH keys now?" ; then
44+ echo " Cloning via HTTPS..."
45+ git clone " $REPO_URL_HTTPS "
46+ else
47+ echo " Please set up your SSH keys and re-run this script. Exiting."
48+ exit 1
49+ fi
4350 fi
4451 git checkout " $BRANCH "
4552 fi
You can’t perform that action at this time.
0 commit comments