Trouble getting latest version of Git

I am using Ubuntu 10.04 LTS. I'm looking at using git as source control for personal projects and Github as a remote repository. I was having trouble pushing a commit to my remote github repo getting the following error message:

The requested URL returned error: 403 while accessing https://github.com/Jstall/helloworld.git/info/refs

When I did some digging I found that the problem could be me not having the latest version of Git. When I did a --version I found that I have version 1.7.0.4 locally. So I tried to update git using:

sudo apt-get install git

but get the following error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package git is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package git has no installation candidate

I've tried running:

sudo apt-get update

and trying again but it didn't seem to make a difference. I'm not sure if it's relevant but I'm also getting a couple of 404's when I run update:

Err http://wine.budgetdedicated.com edgy/main Packages
  404  Not Found
Fetched 4,117B in 0s (5,142B/s)
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/edgy/universe/binary-i386/Packages.gz  404  Not Found [IP: 91.189.91.15 80]

W: Failed to fetch http://wine.budgetdedicated.com/apt/dists/edgy/main/binary-i386/Packages.gz  404  Not Found

I'm not sure when I should try next. Could anyone suggest a course of action to get this resolved? Any advice would be appreciated. Thanks much!


You can use my Launchpad PPA, currently it gives you git 1.8.0.

Git is available for the following Ubuntu distributions:

  • Ubuntu 12.10 (Quantal)
  • Ubuntu 12.04 (Precise)
  • Ubuntu 11.10 (Oneiric)
  • Ubuntu 11.04 (Natty)
  • Ubuntu 10.10 (Maverick)
  • Ubuntu 10.04 (Lucid)

To install my git repository follow the instructions at: Git Packages for Ubuntu • A Virtual Home

sudo add-apt-repository ppa:pdoes/ppa

To get rid of the 404, you have to remove them from your repository sources. I'm not 100% sure if I give the right instructions as I don;t have a machine with Lucid but it should fairly close.

  • Start Synaptic Package Manager
  • Settings -> Repositories
  • Other Software
  • Unselect the repositories that give you the 404.

Apparently git on a Linux system refers to GNU Interactive Tools. The command to download the Git version control system on Ubuntu is:

sudo apt-get install git-core git-doc 

If you want or need additional tools (including GUI and Web access), you can:

sudo apt-get install gitweb git-gui gitk git-email git-svn

This issue continues even up to and including ubuntu 16.04 ... Solution :

System Settings -> Software & Updates -> Other Software

and then checkbox ON :

Canonical Partners
Software packaged by Canonical for their partners

then issue

sudo apt-get update
sudo apt-get -y install git-core