I'm trying to add git functionality to a production CentOS 5.5 system that has no development tools (since it is a production system). So I don't have access to make/gcc/etc. I basically want to install Git to be able to easily & quickly synchronize a website dir with my Git repo, so I have no need for compiling any source files.

I do not have root access, and for obvious reasons, root is does not want to install Git on a prod system, but is okay if I can set it up locally for my own use.

I've tried to download and unpack a git-core.rpm into my home dir and although I am able run some functionality of git, none of git's dependencies are where it expects them and so it fails.

My structure looks like the following:


When I run something like git help clone, I get an error msg No manual entry for git-clone. This is confirmed by git --man-path (/usr/share/man). Other commands fail similarly.

How can I tell git to use ~/git as the root instead of / as the root to all git dependencies without recompiling? I cannot seem to find any environment vars or git vars that I can set.

There is a similar question posted on SO here, but unfortunately both solutions offered are not viable - ie: recompile git (I don't have any make tools) or unpack the rpm (have tried but as indicated, git looks for predefined paths).

As suggested here, I have tried setting GIT_EXEC_PATH but with minimal success as well:

[eric ~]$ export GIT_EXEC_PATH=~/git/usr/bin/git
[eric ~]$ git --man-path
[eric ~]$ git help clone
No manual entry for git-clone
[eric ~]$ git --exec-path
  • How did you install git-core.rpm in your home dir?
    – Satish
    Dec 20 '12 at 16:10
  • This is basically a duplicate of stackoverflow.com/questions/2647484/…
    – jjlin
    Dec 20 '12 at 16:16
  • 2
    @Satish - I downloaded git- and used rpm2cpio git- | cpio -idmv
    – Eric B.
    Dec 20 '12 at 16:17
  • @jjlin - It is similar to that question, yes, but not a duplicate. Perhaps I should have linked to that question in my original post - I'll edit it to make the correction. Unfortunately, the solutions offered in that SO post are not applicable (ie: download source and recompile as I do not have make tools, or just extract the rpm as extracting the rpm does not work).
    – Eric B.
    Dec 20 '12 at 16:19
  • @jjlin - it is mentioned in the other post, but from a quick google to understand what it does, it seemed to be related to the msysGit project and/or the build process. I updated my question with the info relating to GIT_EXEC_PATH as well.
    – Eric B.
    Dec 20 '12 at 16:41

Unless the RPM is set up for relocation (the vast majority isn't) you can't do it that way. Best bet is getting stuff installed officially, so it will be tracked/updated with the rest of the system.

If that can't be done, you could do something like:

  1. Fetch latest source
  2. Configure with e.g. "configure prefix=$HOME ..."
  3. Build and install, e.g. "make install"
  4. Figure out what comes from git, at least stuff in ~/bin/, ~/share/man/, ~/libexec/, pack that up and transfer it to the victim machine
  5. Unpack on the victim and try it out. Put ~/bin at the end of yout PATH

But please don't do it without first making sure with the Powers That Be that this is OK by them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.