LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 08-17-2009, 02:11 PM   #1
Laurens73
Member
 
Registered: Aug 2009
Location: Zeewolde, Flevoland NL
Distribution: Debian squeeze (Gnome) on netbooks; Debian Lenny on servers and Debian wheezy (XFCE) on new laptops
Posts: 144

Rep: Reputation: 23
GPG Import script: maybe something for you?


We all get this annoying message appearing on the screen sometimes:

Code:
W: GPG error: http://www. ... The following signatures couldn't be verified 
because the public key is not available: NO_PUBKEY ...
I got a simple solution for it and I like to share it with you all:

/bin/gpgimport
Code:
#!/bin/bash

echo GPG keys are being fetched...
echo Importing keys: $*

#Choose a server wich is the fastest in your area
#gpg --keyserver subkeys.pgp.net --recv-keys $* 
gpg --keyserver wwwkeys.eu.pgp.net --recv-keys $*
#gpg --keyserver wwwkeys.pgp.net --recv-keys $*
#gpg --keyserver wwwkeys.gpg.cz --recv-keys $* 
#gpg --keyserver wwwkeys.cz.pgp.net --recv-keys $*
#gpg --keyserver wwwkeys.ch.pgp.net --recv-keys $*
#gpg --keyserver keyserver.kjsl.com --recv-keys $*
#gpg --keyserver sks.keyserver.penguin.de --recv-keys $*
#gpg --keyserver pgp.keyserver.ch --recv-keys $*
#gpg --keyserver pks.ms.mff.cuni.cz --recv-keys $*
#gpg --keyserver pks.gpg.cz --recv-keys $*
#gpg --keyserver irdu.nus.edu.sg --recv-keys $*

#Exorting fetched keys:
gpg --armor --export $* |apt-key add -
Copy this script to a path directory and open an xterminal. Chmod the script to 755. Do an apt-get update (or aptitude) and when then gpg key is displayed after NO_PUBKEY type gpgimport on the commandline and select all gpg keys with your mouse and paste them with middleclick separated by a space. for example:

(dutch example version of my script)
Code:
pc:~# gpgimport 3916C431F80994F6 EEFB43B2FBABB737 07DC563D1F41B907 

GPG sleutel wordt opggehaald bij de bekende servers...
Te importeren sleutel: 3916C431F80994F6 EEFB43B2FBABB737 07DC563D1F41B907
gpg: opvragen sleutel F80994F6 van hkp sleutelserver wwwkeys.eu.pgp.net
gpg: sleutel F80994F6: publieke sleutel “Stefan Lippers-Hollmann (sidux.com) <s.l-h@gmx.de>” geimporteerd
gpg: no ultimately trusted keys found
gpg:        Totaal aantal verwerkt: 1
gpg:                  Geimporteerd: 1
gpg: sleutel F80994F6: publieke sleutel “Stefan Lippers-Hollmann (sidux.com) <s.l-h@gmx.de>” geimporteerd
gpg: no ultimately trusted keys found
gpg:        Totaal aantal verwerkt: 1
gpg:                  Geimporteerd: 1
gpg: sleutel F80994F6: publieke sleutel “Stefan Lippers-Hollmann (sidux.com) <s.l-h@gmx.de>” geimporteerd
gpg: no ultimately trusted keys found
gpg:        Totaal aantal verwerkt: 1
gpg:                  Geimporteerd: 1
OK
When adding a new repository and the message appears again, just type gpgimiport GPG KEY and the key will be imported.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Import GPG Key Error Peter_APIIT Fedora 3 06-30-2007 03:37 AM
Help me to import a file in gpg Gins Linux - Software 8 10-13-2006 01:20 PM
gpg keys, and why i cant import them AnimaSola Linux - Software 3 04-17-2005 06:49 PM
how to import secretkey (gpg)?! overlord73 Linux - Software 0 01-18-2005 01:30 AM
How do I import a GPG key from RPMfind.net lehumphr Linux - Newbie 3 05-07-2004 01:51 PM


All times are GMT -5. The time now is 06:27 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration