Running a recent Git for Ubuntu can sometimes be problematic. The Git version in the offical Ubuntu archives lags behind the maintainers, stable, version. To solve this install the Maintainers team version.
Add the PPA (personal Packages Archive) to your apt sources
deb http://ppa.launchpad.net/git-core/ppa/ubuntu precise main
deb-src http://ppa.launchpad.net/git-core/ppa/ubuntu precise main
or
sudo add-apt-repository ppa:git-core/ppa
if add-apt-repository is not installed, install it with apt-get install python-software-properties
sudo apt-get update && sudo apt-get install git
In a corporate envrionment the case of an unverified key can rise a problem. Cause is that
apt-key adv --recv-keys ;
may not work behind some firewalls. to solve this issue, follow these steps:
Open http://keyserver.ubuntu.com/ in a Browser and search for the offending key. Don’t forget to mark the string as hex by prepending 0x.
apt-key add <file>
apt-get update
For details see opensourceforgeeks