The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Problems Installing GIT

Discussion in 'General Discussion' started by Jason Brice, Apr 27, 2009.

  1. Jason Brice

    Jason Brice Active Member

    Joined:
    Sep 29, 2001
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    I have been trying to get GIT (http://git-scm.org/) installed and I'm running into a few problems.

    I am trying to install it into a user's directory, but using root to do so, and have been following the instructions here:
    http://www.hostmonsterforum.com/showthread.php?t=4589

    However, when I get the step where the version of git is checked, I get this error:
    Code:
    bash: git: command not found
    Which suggests to me that the path to git hasn't been set up properly.

    Any ideas?
     
  2. WebScHoLaR

    WebScHoLaR Well-Known Member

    Joined:
    Dec 14, 2005
    Messages:
    511
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Planet Earth
    If you installed GIT in any user directory then you can add path to it in .bash_profile of that user. The user will then not have to specify the complete path to git binary.
     
  3. damainman

    damainman Well-Known Member

    Joined:
    Nov 13, 2003
    Messages:
    515
    Likes Received:
    0
    Trophy Points:
    16
    Don't mean to bump the thread but this is relevant to me since I an attempting to do exactly the same but with a slight difference.

    Adding the path to ".bash_profile" doesn't seem to work for mebecause the GIT client logs in SSH via non-interactive so it doesn't read custom paths.

    Via normal SSH the .bash_profile works great, but how would I go about making sure the correct path is used when logging in non-interactive?

    Thank you in advance.
     
    #3 damainman, Jul 21, 2010
    Last edited: Jul 21, 2010
  4. Zion Ahead

    Zion Ahead Well-Known Member

    Joined:
    Nov 10, 2006
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    I followed the instructions and got it working in root

    But it won't work in jailed shell for another user, even after adding this

    export PATH=$HOME/git/bin/:$HOME/git/lib/libexec/git-core/:$PATH

    to his .bash_profile file, nothing.

    user@hisdomain.com [~]# git --version
    -jailshell: git: command not found
     
Loading...

Share This Page