Skip to content

Instantly share code, notes, and snippets.

@cota
Created August 16, 2013 15:39
Show Gist options
  • Save cota/6250974 to your computer and use it in GitHub Desktop.
Save cota/6250974 to your computer and use it in GitHub Desktop.
Install git from source. Fixes the "fatal: Unable to find remote helper for 'https'" issue when cloning via https on some installations.
#!/bin/bash
set -e
PREFIX=$HOME
CURL_=curl-7.32.0
CURL=${CURL_}.tar.bz2
if [[ ! -d $CURL_ ]]; then
wget http://curl.haxx.se/download/$CURL
tar xf $CURL
cd $CURL_
./configure --prefix=$PREFIX
make -j
make install
cd -
fi
EXPAT_=expat-2.1.0
EXPAT=${EXPAT_}.tar.gz
if [[ ! -d $EXPAT_ ]]; then
wget http://downloads.sourceforge.net/expat/$EXPAT
tar xf $EXPAT
cd $EXPAT_
./configure --prefix=$PREFIX
make -j
make install
cd -
fi
GIT_=git-1.8.3
GIT=${GIT_}.tar.bz2
if [[ ! -d $GIT_ ]]; then
wget https://www.kernel.org/pub/software/scm/git/$GIT
tar xf $GIT
cd $GIT_
make configure
./configure --prefix=$PREFIX --with-curl=$PREFIX --with-expat=$PREFIX
make -j
make install
cd -
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment