SCT v6.5 installation fails due to "failed to connect to github.com" error

hello,I have some problem with installing SCT

install_sct_log.txt (1.0 KB)

Dear @jiang,

It looks like there is a network issue when trying to fetch the SCT code.

fatal: unable to access 'https://github.com/spinalcordtoolbox/spinalcordtoolbox.git/': 
Failed to connect to github.com port 443 after 75013 ms: Couldn't connect to server

This may happen when your internet provider blocks access to GitHub (region blocking, VPN, etc.).

To get around this problem, you can download the code yourself by clicking on “Source code (zip)”:

image

Then, you can run the installer script from the extracted folder:

cd ~/Downloads/spinalcordtoolbox-6.5
./install_sct

This will allow you to skip the step where the code files need to be downloaded.

Kind regards,
Joshua

ok, I download it, but it still can’t work

OK, I see. The installer now fails when trying to fetch the Miniforge installer from GitHub. This is a problem, because Miniforge only hosts its installers on GitHub: Miniforge Releases

I will try to come up with a solution that avoids having to download Miniforge from GitHub. I will respond shortly. My apologies for this inconvenience.

Kind regards,
Joshua

To get around being region-blocked from GitHub, you can download the Miniforge installer yourself:

  1. Go to https://github.com/conda-forge/miniforge/releases/download/24.11.2-1/ and download the file "Miniforge3-MacOSX-x86_64.sh".
  2. Rename the file from "Miniforge3-MacOSX-x86_64.sh" to "miniforge.sh"
  3. Copy the miniforge.sh file into the spinalcordtoolbox-6.5 directory.

Then, you will need to update the "install_sct" script. Please open up the "install_sct" file in a text editor, and change the following lines (L591-L600):

After:

# Download miniforge
if [ -e "miniforge.sh" ]; then
    echo "Miniforge installer exists in working directory. Copying to tmpdir..."
    cp miniforge.sh "$TMP_DIR/"miniforge.sh
else
    print info "Downloading Miniforge..."
    case $OS in
    linux)
      download "$TMP_DIR/"miniforge.sh https://github.com/conda-forge/miniforge/releases/download/24.11.2-1/Miniforge3-Linux-x86_64.sh
      ;;
    osx)
      download "$TMP_DIR/"miniforge.sh https://github.com/conda-forge/miniforge/releases/download/24.11.2-1/Miniforge3-MacOSX-x86_64.sh
      ;;
    esac
fi

Then you can run ./install_sct again. It will use the miniforge.sh that you already have downloaded.

We will be sure to include this fix in the next version of SCT. Thank you for your patience and understanding.

Kind regards,
Joshua

I finish what you say. and all it work. but it still some problems.

is this success?

Dear @jiang,

Yes, that looks good! :slight_smile:

We will try to include these fixes in a future release of SCT. We will also try to document these fixes on our documentation website.

Kindly,
Joshua

thank you for your help. I hope one day it will open on App Store. this will be more easy.