Search code examples
linuxgnupgopenpgp

Trying to update GPG. My system gives me conflicting results


I'm trying to update my GPG.

user@linuxmint ~/Downloads $ whereis gpg
gpg: /usr/bin/gpg /usr/share/man/man1/gpg.1.gz

user@linuxmint ~/Downloads $ gpg --version
gpg (GnuPG) 1.4.20
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
        CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2

It tells me my version is 1.4.20, weird, OK. Let's update.

user@linuxmint ~/Downloads $ sudo apt-get install gnupg2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gnupg2 is already the newest version (2.1.11-6ubuntu2).
0 upgraded, 0 newly installed, 0 to remove and 58 not upgraded.

Whoa! So it seems I am updated. But the system thinks otherwise. I need to fetch a key, and the older version doesn't support fetch from https.

user@linuxmint ~/Downloads $ gpg --fetch-keys https://keys.qubes-os.org/keys/qubes-master-signing-key.asc
gpgkeys: protocol `https' not supported
gpg: no handler for keyserver scheme `https'
gpg: WARNING: unable to fetch URI https://keys.qubes-os.org/keys/qubes-master-signing-key.asc: keyserver error

Any help is much appreciated


Solution

  • GPG and GPG2 are released as seperate packages. You can use GPG2 through the gpg2 command.

    If it's a problem, you can create an alias in ~/.bashrc:

    alias gpg="gpg2"
    

    But this might cause some problems with other applications utilizing GPG internally.