Tuesday, June 26, 2012

install git 1.7 on ubuntu 8.04LTS(hardy)

source link: http://islandlinux.org/howto/install-latest-git-version-ubuntu

I am in the process of migrating from Subversion to Git for all of my projects and needed a way to install the latest version of Git in Ubuntu. There are many excellent resources that I have combined in this howto. I will be installing Git from Launchpad.
The first step in installing the latest version of Git is to tell apt where and how to get Git. These instructions are for Ubuntu Hardy Heron 8.04 LTS and will also work on later versions. Note that since Ubuntu 9.10 you can use the "sudo add-apt-repository" method to add the latest version of Git to Ubuntu. Create "/etc/apt/sources.list.d/git.ppa.list" and add the following lines (note that you can skip the deb-src if you do not need the Git source):
To use this approach to install the latest Git for other versions of Ubuntu simply change "hardy" to the appropriate name (eg: lucid, karmic, jaunty, or intrepid).
Note that if you were to run "sudo apt-get update" you will get the following error:
W: GPG error: http://ppa.launchpad.net hardy Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E76E800643C34E6
W: You may want to run apt-get update to correct these problems
To remove this message Ubuntu must be told that the package repository can be trusted. Go to the Launchpad PPA for Smartlounge and click on the "Technical details about this PPA". Note the signing key; in this case it is listed as "1024R/643C34E6". Copy the last part of the key and run the following command:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 643C34E6
You should see the following message:
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys 643C34E6
gpg: requesting key 643C34E6 from hkp server keyserver.ubuntu.com
gpg: key 643C34E6: public key "Launchpad PPA for Smartlounge" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
And now you can install the latest version of Git for Ubuntu:
sudo apt-get update
sudo apt-get install git-core
Launchpad PPA for Smartlounge also maintains the following packages:
  • hamster-applet
  • kdiff3
  • kla
  • qgit
  • smlscripts-addon

1 comment: