gpg is the main command line tool of the GNU Privacy Guard (GnuPG), implementing the OpenPGP standard for public key cryptography. It allows encryption, (verification of) signatures and trust models like the web of trust. gpg (and its library gpgme) are the base of many FOSS crypto applications ...

learn more… | top users | synonyms

5
votes
2answers
2k views

Encrypt directory with GnuPG?

Is there any way to encrypt a directory using gpg? It seems to only accept files as arguments.
18
votes
3answers
3k views

How can I find out what keys gpg-agent has cached? (like how ssh-add -l shows you cached ssh keys)

ssh-add -l shows you all ssh-keys that have been added with ssh-add ~/.ssh/id_yourkey. How do I do the analogous thing with gpg and gpg-agent, in other words, ask it to show a list of cached keys?
0
votes
1answer
606 views

Generate GPG secret key from public key and passphrase

I've lost my key. Now I can't sign anything, and servers don't accept unsigned content. The key is uploaded to a keyserver. Now I have fingerprint, public key and I remember my passphrase. How can I ...
1
vote
2answers
29 views

What happens when you verify a detached signature?

I'm trying to understand what happens when verifying a detached gpg signature. Here's an example from the gnupg manual: blake% gpg --verify doc.sig doc gpg: Signature made Fri Jun 4 12:38:46 1999 ...
2
votes
3answers
429 views

Is there a way to GLOBALLY set the DEFAULT keyserver for gpg on Debian?

I am not asking for per-request of a key, I know how to do that, but I want a chosen alternative gpg keyserver to be defaulted to, when no specific keyserver is specified in a request then-on-out. ...
3
votes
1answer
242 views

Problem with public key on apt-get update

I have Lubuntu 16.04. My problem is similar to this questiuon: sudo apt-get update Get:1 http://it.archive.ubuntu.com/ubuntu xenial InRelease [247 kB] Hit:2 ...
3
votes
1answer
15 views

How do I make GPG use keys accessed over SSH?

I have my GPG keys stored on a remote server (accessible via SSH) due to some technical constraints. Is it possible to make GPG use those keys transferred over ssh, without actually copying them ...
4
votes
2answers
8k views

Invalid signatures when running apt-get update

I'm new to linux and am trying to run an update, I get a lot of "Hit"'s and "Ign"'s but in the end I get these errors, does anybody know what they mean and how I can fix them? W: GPG error: ...
1
vote
1answer
1k views

pass and gpg: No public key

I'm using the pass for quite a long time; but after exporting my key storage and gpg keys to another machine I see following output: $ gpg --list-key /home/shved/.gnupg/pubring.gpg ...
1
vote
1answer
21 views

Problem configuring GPG pinentry

I have two hosts, A and B. On A I have the gpg pinentry program setup to be pinentry-curses but I have no idea how I did it anymore. I can not seem to find the difference between A and B, but on A ...
1
vote
1answer
40 views

How to get pinentry-curses to start on the correct tty?

I use gpg-agent for managing both PGP e SSH identities. The agent is started with a script like this gpg_agent_env="$XDG_CACHE_HOME/gpg-agent.env" export GPG_TTY="$(tty)" if ! ps -U "$USER" -o ...
2
votes
4answers
326 views

Generating QR code of very big file?

I want to generate a QR code of my 4096-bit armored GPG private key. The key is so big, the program qrencode seems to fail because of its size. $ gpg --export-secret-keys --armor > ~/private.key $ ...
0
votes
1answer
55 views

linux mint - invalid signature BADSIG 3EE67F3D0FF405B2 for extra.linuxmint.com repository

While trying to run apt-get update on linux mint 17.3 I am getting following error. W: GPG error: http://extra.linuxmint.com rosa Release: The following signatures were invalid: BADSIG ...
5
votes
2answers
574 views

Can emacs use gpg-agent in a terminal at all?

I understand that there are problems with getting pinentry-curses to work with emacs (see some of the comments on http://emacswiki.org/emacs/EasyPG), and so using emacs in a terminal isn't compatible ...
4
votes
2answers
5k views

What does gpg error code 2(GPG_ERR_UNKNOWN_PACKET) mean?

I am tasked to explain the variation of gpg errors that happened in one of my batch script. Currently when I perform gpg decrypt for a specified file it returns 2. The problem with this is when I ...
0
votes
0answers
85 views

GPG error installing VLC in Fedora 20

I'm installing VLC in Fedora and I get this error: warning: /var/cache/yum/x86_64/20/rpmfusion-free-updates/packages/faad2-libs-2.7-5.fc20.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ...
0
votes
1answer
28 views

How to configure gpg-agent to work correctly with obnam?

I'm trying to set up the de-duplicating backup program obnam so that it backups encrypted chunks on a remote server (raspberry pi B3 through ssh with USB hard drive) but can't get it even starting to ...
1
vote
1answer
23 views

CentOS - change the password of GPG file by bash script

I am looking for a bash script which input is the old and the new password for changing password of a *.gpg file. I encrypted a txt file with command gpg -c. System create a file.txt.gpg. How can I ...
1
vote
0answers
27 views

gpg-agent problems on Manjaro Linux (KDE)

Recently Github announced support for signed commits, so I configured Git: git config --global user.signingkey F03CB372 git config --global commit.gpgsign true I already had a GPG key F03CB372, ...
2
votes
0answers
40 views

GPG Key Generation Fails on Alpine Linux Docker Image

I've performed the following test on a docker alpine linux: ole@MKI:~$ docker run --rm -it alpine /bin/ash / # apk add --update duplicity fetch ...
1
vote
1answer
45 views

How can I import a key in PEM format (not OpenPGP) into GPG?

I have data like this: -----BEGIN PRIVATE KEY----- MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQDPzCORz9kUh4yt 73fiG1amQ16jwjXNzNO0d4xUWlrCP3dTfXnvtF35r2N/5Nefw9CcztBUAZACbwtn (... just sample ...
4
votes
5answers
2k views

How to use Emacs to recognize and automatically open GPG encrypted file in ASCII armored format?

gpg -ca passwords.txt create encrypted ASCII file passwords.txt.asc. Emacs open the file as a normal text file: -----BEGIN PGP MESSAGE----- Version: GnuPG v2.0.19 (GNU/Linux) ...
3
votes
1answer
66 views

How can I search gpg-encrypted email with notmuch-mutt?

I'm using mutt, with notmuch-mutt indexing the mail. I have a macro defined in mutt to search multiple mailboxes, using notmuch's integration (as suggested in the man page). macro index <F3> \ ...
0
votes
1answer
892 views

How do I add custom GPG key to Ubuntu/Debian installer?

I'm trying to setup custom Ubuntu install CD using instructions on http://beezari.livejournal.com/191717.html I've added my GPG key to ubuntu-keyring and signed Release file with it (resulting in ...
2
votes
1answer
24 views

gpg problem in using pass password manager

I would like to use the "pass" password manager. I don't seem to be able to get pass to recognize my public key. $ gpg2 --list-keys /home/johndoe/.gnupg/pubring.gpg ------------------------------- ...
1
vote
0answers
25 views

Dictionary attack GPG symmetric encrypted LUKS keyfile

I remember typing in a long phrase for the password. I wrote all the words I could have possibly used into a plain text file, combining the words I know were used in a certain order. I might have ...
2
votes
1answer
76 views

Disable gnome-keyring-daemon

Methods I have tried: https://wiki.gnupg.org/GnomeKeyring https://blog.josefsson.org/tag/keyring/ Removing the GNOME Keyring applications from Startup Applications ...
13
votes
8answers
34k views

gpg asks for password even with --passphrase

I expect the following command to extract the gpg file without asking for password: gpg --passphrase 1234 file.gpg But it asks for the password. Why? This also have the same behavior: gpg ...
1
vote
0answers
62 views

gpg -recv-keys hangs when not run by root

I am trying to install a patched kernel form Arch User Repository but getting One or more PGP signatures could not be verified! error. I looked at the PKGBUILD and attempted to add the keys with the ...
6
votes
1answer
244 views

using GPG key in Gajim without passphrase

I would like to use gpg key with Gajim (jabber client) without a passphrase. I have generated my gpg key without a passphrase (or with an empty passphrase, I don't know which - I just just pressed ...
0
votes
2answers
30 views

Why is no second PGP possible?

I've a problem with the command "gpg --gen-key". At my very first time, I connected an eMail-Account to this and everything worked fine. I can use it and so on. No Problem. The problem is: I want to ...
10
votes
3answers
517 views

mutt: Use gpgme or classic gpg?

Mutt's wiki on GnuPG integration and many other places (like default on Debian) use the classic way of connecting mutt to gnupg. That is, one configures a bunch of commands to call gpg directly. On ...
0
votes
1answer
52 views

Trying to verify file integrity with GnuPG. “BAD signature” all the time

I'm completely new to GnuPGP and I'm trying to test it. Basically, what I've done is downloaded the Linux Mint key (ID 0FF405B2) from pgp.mit.edu. gpg --keyserver pgp.mit.edu --recv-keys 0FF405B2 ...
2
votes
1answer
58 views

Use my ssh key to sign git commits

I am trying to setup automatic signing of git commits with gpg. I have a private/public key pair, that I use to authenticate to the server and be able to push commits. I would like to use the same key ...
3
votes
1answer
42 views

gpg: “secret key not available” when sec & pub key are in keyring

I received an file encrypted with the public key I generated but I can't get it to decrypt. Steps: gpg key-gen default options gpg --export -a <email> > pub.key sent the pub.key received ...
0
votes
0answers
24 views

Check gpg key capabilities on exported gpg public key

I am trying to write a script which will import public gpg keys onto my keyring. Before importing I would like to make sure that imported key or its subkey actually has Encryption capability (shows as ...
4
votes
3answers
442 views

Usage of pinentry with keepass2 for gpg mail encryption

Debian Jessie, XFCE 4.10, KeePass2, IceDove (with Enigmail).. I'm using KeePass2 generated passwords for my gpg private key, to de/encrypt mails. Icedove is my client which uses the enigmail. As ...
1
vote
0answers
150 views

gpg: passwordless decryption works in terminal, but not in tmux based msmtp/mutt (can't open /dev/tty)

first try: (with --no-tty in my msmtp config) (reboot) head -n 1 ~/.gnupg/gpg.conf use-agent gpg agent is started: % systemctl --user status gpg-agent.service gpg-agent.service - GnuPG private ...
5
votes
4answers
5k views

Encrypt multiple files at once

I'm writing a script which creates project archives and then creates 7z archives of them to make it easier on me to save specific versions and keep encrypted backups. After I've generated the ...
0
votes
1answer
31 views

Why does mutt hang when running gpg in tmux?

I run mutt in tmux and when I run gpg to sign or encrypt, gpg shows a blank screen where I would expect to type my passphrase. I've straced gpg and it shows that it's hanging waiting on a socket ...
1
vote
1answer
20 views

scdaemon/gpg doesn't work

I am trying to setup my Nitrokey (GPG usb Smartcard). I got it to work by adding reader-port into the scdaemon config file. I had to do this because my laptop has multiple built in smartcard readers. ...
4
votes
3answers
1k views

Emacs auto encryption and gpg

Emacs encrypts/decrypts .gpg files automatically. But recently I have lost the ability to decrypt files encrypted by the Linux gpg tool and vice versa. I use: passphrase symmetric encryption gnupg ...
3
votes
1answer
97 views

yum update exits with “Didn't install any keys”

I just installed Centos 6.7 on Virtualbox and ran yum update with this output: warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY Retrieving key from ...
2
votes
1answer
127 views

Gentoo Linux GPG encrypts properly a file passed through parameter but throws “Inappropriate ioctl for device” when reading from standard input

I am running Gentoo Hardened with kernel 4.1.7-hardened-r1 and I am trying to encrypt a file using GPG from a shell session opened from SSH and with the DISPLAY variable disabled in order to use ...
1
vote
2answers
192 views

How to replace GnuPG stable with GnuPG modern?

First I would like to state that I'm an absolute beginner in the Linux environment. For decades I only used Windows. Since a week or two I'm now using Debian for developing a C++ application with ...
1
vote
0answers
44 views

dirmngr does not start with proper home directory unless it is restarted

I am trying to follow these guidelines for gpg best practices: https://help.riseup.net/en/security/message-security/openpgp/best-practices but I am having trouble with dirmngr, which handles all ...
3
votes
3answers
200 views

How do I tell Mutt to ask for a gpg passphrase?

I'm slowly migrating to mutt after years of Thunderbird and stumped by gpg. I have Mutt signing messages by default, but I don't get asked for a passphrase and then the message fails: gpg: can't ...
3
votes
1answer
113 views

gpg-agent instead of ssh-agent

I have a Yubikey 4 and I want to use my GPG keys stored on this to authenticate to SSH servers.I want to use GitHub for a start. I have already added my GPG authentication key to GitHub. My problem ...
3
votes
1answer
917 views

Debian: GPG cannot fetch Linux Kernel key

I am in the process of recompiling the kernel on Debian. Following the instructions on kernel.org, the first step is to verify the signature. But GPG complains that it cannot find the public key: # ...
0
votes
1answer
98 views

How to verify debian cds with gpg?

I have downloaded Debian installation iso from http://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/. I have also downloaded the MD5SUMS and MD5SUMS.sign . I verified the md5sum of iso matches ...