Linux SNMP ekiga

Script to import a key from repository in Ubuntu

Today I wanted to install a program called shutter, a utility to capture screenshots like faststone in Window$.

The problem was with the keys of the repository. When you add a repository in Ubuntu from the Software Sources, you get an error like this one:

Verification failed of the key

Verification failed of the key

To import the key to be verified, I made a simple script that do it for us.

We only must execute the script with one argument. This argument is the key (an hexadecimal number) that appears in the error.

The script is like that:

#!/bin/sh
gpg --keyserver subkeys.pgp.net --recv $1
gpg --export --armor $1 | sudo apt-key add -

If we save the script: importarKeys.sh, then we only have to do:

importarKeys.sh 3CCBDA4000FD2D7B

Leave a Reply