If you cannot access yum, apt-get, etc. (For example, on a cluster machine without sudo access), install the new version of openssl locally and manually as follows:
Get the source code, unzip it, go into the directory and create the assembly directory (very important):
wget https://www.openssl.org/source/openssl-1.0.2r.tar.gz tar -xvzf openssl-1.0.2r.tar.gz cd openssl-1.0.2r mkdir builddir
Configure the assembly for the local destination (make sure it is different from your source directory, do not just use /home/yourdir/openssl-1.0.2r/), do and install:
./config --prefix=/home/yourdir/openssl-1.0.2r/builddir --openssldir=/home/yourdir/openssl-1.0.2r/builddir make make install
Add the paths to the beans and libraries from the assembly directory to the appropriate variables in your shell configuration file (for example, ~ / .bashrc) and create it:
export PATH=/home/yourdir/openssl-1.0.2r/builddir/bin:$PATH LD_LIBRARY_PATH="/your/other/dirs/libs:/home/yourdir/openssl-1.0.2r/builddir/lib:" source ~/.bashrc
OpenSSL should now be in your new default directory:
which openssl > /home/yourdir/openssl-1.0.2r/builddir/bin/openssl
Now try reinstalling git, possibly with make distclean.
source share