Prefix the command with
sudo. This gives you Administrative permissions for one command (runs it as the
root user). You will be prompted for your user password.
sudo apt-get install git
More information on
Note: You may also temporarily log in as
root by typing
Since the OP posted new information with a different error:
Only one instance of the package manager/updater can be running at one time. Make sure you have no other terminals trying to install software, or that your Software Updater isn't trying to install updates. Best way to make sure of this if you're not sure is to restart, then run the command in the terminal before you do anything else.
git-core is now an obsolete package in the PPA. The package has been renamed to simply
git. I have updated my answer and link accordingly.