For the record, I think your question was perfectly reasonable for this
forum. It is related to git installation/configuration on a particular OS.
This group doesn't get much traffic, as it is--if we tell people to go
elsewhere to solve their problems, it will just continue to be a ghost town.
Here are some more general pointers (hopefully for the benefit of all):
It's usually easier to configure software in CentOS via yum, the package
manager. CentOS 5 doesn't have a yum package for git (CentOS 5 is pretty
old, you should consider upgrading to 6 at some point!), but there are
people who have kindly set up git packages for CentOS 5, such as:
There are a couple of great books online for git specifically:
(this contains the proper "from source" installation commands with the
$ make prefix=/usr all ;# as yourself
$ make prefix=/usr install ;# as root)
And there's "pro git": http://progit.org/book/ , written by one of the guys
at github. I learned a lot reading through the branching sections.
You should definitely set up a user account to push with via SSH. It's
possible this server isn't in the wild, which is fine, but if it is
accessible by the internet, I highly recommend disabling root ssh access
all together. See the section on disabling root SSH access in CentOS 5
On Tue, Apr 10, 2012 at 11:17 AM, Paul Hollyer <p...@hollyer.me.uk> wrote:
> On Tuesday, April 10, 2012 3:21:04 PM UTC+1, Konstantin Khomoutov wrote:
>> On Tue, 10 Apr 2012 06:46:12 -0700 (PDT)
>> Paul Hollyer <p...@hollyer.me.uk> wrote:
>> > > env $PATH
>> > > to see what your path looks like.
>> > Thanks for the quick replies, here is the result of env $PATH:
>> > env:
>> > /root/local/bin:/usr/kerberos/**sbin:/usr/kerberos/bin:/usr/**
>> > sbin:/sbin:/usr/local/rvm/bin:**/root/bin: No such file or directory
>> > I assumed re-installing git would make it add the required paths
>> > where necessary again if they had been broken.
>> Installing something by `make install` never touches the environment
>> (and for good).
>> > Can you help me fix this?
>> > Git is at /usr/local/src I think,
>> Very improbable.
>> Possibly you unrolled the Git source tarball there
> I did.
>> , but when you did
>> it probably picked /usr/local as its "installation prefix",
>> so supposedly you do have main Git binary under /usr/local/bin, and
>> that's what you're supposed to add to your PATH.
>> > so how do I add this to the search path?
>> The answer is "it depends".
>> The most correct approach (to me) is to find binary package(s) for Git
>> matching your OS (and its version), and install them. This gives you
>> two benefits:
>> 1) Git will be installed in a well-known place, where it will be
>> accessible without messing with the user's environment.
>> 2) You will have less problems when uninstalling or upgrading Git later,
>> as this will be routinely carried out by the package manager.
>> If you insist on building Git from the source, there are two ways:
>> 1) Run `./configure --help` and see what it needs to install Git into
>> the standard hierarchy, that is, under /usr.
>> Usually this is --prefix=/usr
>> 2) Install as-is, but notice where the files are installed.
>> Just run `make install >/tmp/log` and inspect the generated log file
>> to see where the files have been installed.
> This is what I did, following a recipe provided by someone using Git and
> Centos. I didn't think, this morning, when running make install, to pipe or
> > (append?) the output to a log file. These are the sort of common
> techniques that are yet to come naturally for me.
>> In the latter case you might have to fix the environment *of the user
>> under which account Git will run.* This is important: from the output
>> you shown us, it follows that you run this command as root. It's
>> highly unlikely you're pushing as root as well (if you're a sensible
>> person at least),
> I'm not a sensible person, I need to fix this.
>> and you have to tweak either the global environment
>> or the environment of the mentioned user.
>> How to do that depends on the shell which is spawned by SSH on the
>> server when you push. Usually it's the same as the user's login shell
>> (the one used for interactive logins).
>> The config file to tweak depends on the shell.
>> For bash this will be
>> and you'll have to add to it something like
>> export PATH="$PATH:/usr/local/bin"
>> > Sorry if it's a basic linux question, but am learning by doing, and
>> > fixing.......
>> As you can see, you'll have to get a book on Unix and read it as the
>> question being discussed has little to do with Git.
>> You ccan also get help on relevant resources such as news groups
>> or http://stackoverflow.com
> I have recently completed an introductory Linux course with the OU (about
> £275 I think it was), and am looking to do more when the new term starts in
> August/September. I'm not a free-loader expecting you to give me all the
> answers. 99% of the time I will try and find a solution to a problem
> myself, it's just that due to time contraints today, and the fact that I
> didn't know if it was a Linux issue or a Git installation that had become
> corrupted, that I just asked the question first - hoping to be pointed in a
> direction where I could find the answers.
> I'm in the process of trying to learn a lot of stuff myself, I don't have
> anyone I can discuss problems with face to face, so Google Groups is my
> only real support network.
> Thanks to everyone who has posted, I'll make the necessary changes to my
> server tonight.
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To view this discussion on the web visit
> To post to this group, send email to firstname.lastname@example.org.
> To unsubscribe from this group, send email to
> For more options, visit this group at
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To post to this group, send email to email@example.com.
To unsubscribe from this group, send email to
For more options, visit this group at