]>
git.saurik.com Git - apt.git/blob - cmdline/apt-key
6 echo "Usage: apt-key [command] [arguments]"
8 echo "Manage apt's list of trusted keys"
10 echo " apt-key add <file> - add the key contained in <file> ('-' for stdin)"
11 echo " apt-key del <keyid> - remove the key <keyid>"
12 echo " apt-key list - list keys"
17 if [ -z "$command" ]; then
23 if [ "$command" != "help" ] && ! which gpg
>/dev
/null
2>&1; then
24 echo >&2 "Warning: gnupg does not seem to be installed."
25 echo >&2 "Warning: apt-key requires gnupg for most operations."
29 # We don't use a secret keyring, of course, but gpg panics and
30 # implodes if there isn't one available
32 GPG
="gpg --no-options --no-default-keyring --keyring /etc/apt/trusted.gpg --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg"
36 $GPG --quiet --batch --import "$1"
40 $GPG --quiet --batch --delete-key --yes "$1"
44 $GPG --batch --list-keys
47 $GPG --batch --fingerprint
50 echo "Executing: $GPG $*"