Additing Repository and third party signature in Ubuntu / Debian

Posted on 6:57 PM by Bharathvn

To get started using the Google repository, bring up the /etc/apt/sources.list
file in a text editor (nano, vi) via sudo:

$ sudo vi /etc/apt/sources.list

Then add the following two lines to the bottom of the sources.list file:

# cn – added for google software

deb http://dl.google.com/linux/deb/ stable non-free

You also need to download the Google signing key for authenticating the Google packages by way of a digital signature. This digital key could be downloaded using wget and placing the downloaded file in the /tmp/ directory for importing as a second step.

$ wget https://dl-ssl.google.com/linux/linux_signing_key.pub -O /tmp/key.pub
--08:26:46-- https://dl-ssl.google.com/linux/linux_signing_key.pub
`/tmp/key.pub' ...

The wget command (described in Chapter 12) downloads a file from the Google site
and places it into /tmp/key.pub. The crucial part here is that this is the public encryption key used to verify the packages downloaded from the Google site.
Then import the key into APT using the apt-key command:

$ sudo apt-key add /tmp/key.pub
Password:
OK

Check the APT security keys to make sure the Google digital signature was imported
correctly (some output omitted):

$ sudo apt-key list
...
uid Google, Inc. Linux Package Signing Key

sub 2048g/C07CB649 2007-03-08

Next, update the APT package cache to refresh the new repository. This is done using sudo and running apt-get update. Make sure to check for the Google repository as it scrolls by:

$ sudo apt-get update
Get:1 http://dl.google.com stable Release.gpg [189B]
Ign http://dl.google.com stable/non-free Translation-en_US
Get:2 http://dl.google.com stable Release [1026B]