Install Git offline without sudo

compilingdependenciesgitnot-root-usersoftware installation

I have a corporate Linux server which does not have internet connection, and sudo access needs to be approved through many levels of hierachy. I've tried install git but I soon realized this needs a whole bunch of dependencies like C compiler to install, of which I do not have the dependencies.

What I need is a method to have git on my server, maybe installing it as a standalone, taking care of the dependencies that are required, without internet or preferbly sudo. It's very straight forward in windows box, but I am stuck for Linux.

Problem with this solution is that it still requires sudo.

Help please!

Best Answer

I found a solution that works. To iterate my steps:

1) Download relevant RPM (or here)

2) Copy to Linux server and upack using (replace filename as necessary)

rpm2cpio git-1.7.9.6-1.el6.rfx.x86_64.rpm | cpio -idmv

3) Update $PATH:

PATH=$PATH:<your path to git>/usr/bin

4) Now see it work

git --version
Related Question