Yes, unsupported, but I'm feeling generous. Let's build git from source. I tested this on a completely clean install of 16.10. Worked for me! :D
Update sources
Edit your /etc/apt/sources.list
(if you hadn't already) to replace archive.ubuntu.com
with old-releases.ubuntu.com
. Also comment out the security.ubuntu.com
lines with a "#"
sudo nano /etc/apt/sources.list
Use ALT+R to do search/replace.
So it should look something like this:
deb http://old-releases.ubuntu.com/ubuntu/ yakkety main restricted
deb http://old-releases.ubuntu.com/ubuntu/ yakkety-updates main restricted
deb http://old-releases.ubuntu.com/ubuntu/ yakkety universe
deb http://old-releases.ubuntu.com/ubuntu/ yakkety-updates universe
deb http://old-releases.ubuntu.com/ubuntu/ yakkety multiverse
deb http://old-releases.ubuntu.com/ubuntu/ yakkety-updates multiverse
deb http://old-releases.ubuntu.com/ubuntu/ yakkety-backports main restricted universe multiverse
#deb http://security.ubuntu.com/ubuntu yakkety-security main restricted
#deb http://security.ubuntu.com/ubuntu yakkety-security universe
#deb http://security.ubuntu.com/ubuntu yakkety-security multiverse
Update packages
This will just install the latest (lulz) updates from years gone by.
sudo apt-get upgrade
If you have a bunch of updates, it might be worth a reboot at this point, as you may have a "new(er)" kernel.
It's possible you've already done the above steps long ago, before the system went out of support, and there are no more updates. That's fine.
Get git source
Let's get the earliest git source tarball you can get. The --no-check-certificate
is required because the SSL certs are all outdated on your system.
cd ~
wget --no-check-certificate https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.25.5.tar.gz
Unpack the source
tar zxvf git-2.25.5.tar.gz
cd git-2.25.5
Get the pre-requisites to build
We need ourselves a compiler, to compile git, make to build it and some dependencies.
sudo apt install gcc make zlib1g-dev gettext
Configure
./configure
This will either succeed and the last 3 lines will be:
configure: creating ./config.status
config.status: creating config.mak.autogen
config.status: executing config.mak.autogen commands
or it will fail, and we cannot continue here.
Make
Here's where the magic happens. We will compile the git
binary and all the other bits and bobs.
make
Depending on the speed of your system this may take a few minutes. It will spit out "CC" prefixed progress constantly.
There shouldn't be any errors, as git is quite simple to compile. The last lines will say stuff like "GEN bin-wrappers/" followed by some commands.
Test git
./git version
Should show:
git version 2.25.5
Install git
sudo make install
This will copy the binaries to /usr/local/bin
so if bitbucket needs to know where to find the new git binary, that's where it is.
The which git
command should return /usr/local/bin/git
and git version
should return the right version.
Good luck!