GNU Privacy Guard (GnuPG or GPG) is a GPL Licensed alternative to the PGP suite of cryptographic software. GnuPG is compliant with RFC 4880, which is the current IETF standards track specification of OpenPGP.
Questions tagged [gnupg]
831 questions
180
votes
9 answers
How can I restart gpg-agent?
Some changes in the GnuPG configuration demands a gpg-agent restart / reboot (according to the doc), but... How can I do that? I tried gpg-agent restart, service gpg-agent restart, but did not succeed.
Felipe
- 2,338
147
votes
5 answers
Keep GnuPG credentials cached for entire user session
GnuPG can, with gpg-agent, cache access to a private key. How can I keep that cache active for the entire user session?
When I unlock the key for gpg-agent, it only stays cached for a limited time. With SSH's agent, I enter the passphrase one time…
bignose
- 3,325
146
votes
2 answers
How to manage GPG keys across multiple systems?
I'm new to using GnuPG and trying to understand how best to use it. I've reviewed Short, easy to understand explanation of GPG/PGP for nontechnical people?, but most guides explain PGP with a single-machine perspective.
I want to use GnuPG on three…
Justin C
- 2,601
135
votes
15 answers
How to force GPG to use console-mode pinentry to prompt for passwords?
Using gpg from a console-based environment such as ssh sessions fails because the GTK pinentry dialog cannot be shown in a SSH session.
I tried unset DISPLAY but it did not help. The GPG command line options do not include a switch for forcing the…
ccpizza
- 8,241
109
votes
1 answer
Are GnuPG 1 and GnuPG 2 compatible with each other?
With Macports, I realize that there are ports gnupg and a newer gnupg2. I'd like to use GnuPG to encrypt files. Should I install both, or just one is enough? If I installed both, are both compatible with each other? Does it matter which one I…
qazwsx
- 9,311
108
votes
3 answers
One GnuPG/PGP key pair, two emails?
I have two emails I use frequently, for both of which I'd like to use PGP keys generated/managed by GnuPG. I'd like to avoid creating a different key pair for each email, if possible, as that's unnecessary for my situation, i.e. I use the two emails…
Computist
- 3,015
- 6
- 31
- 33
100
votes
4 answers
Are GPG and SSH keys interchangable?
I want to generate an RSA key in GPG and use it in SSH login. Is this even possible? If so, how?
edit: see @wwerner's answer, I didn't try it but it seems to be the current solution (as of 2018)
destan
- 1,157
98
votes
4 answers
gpg: signing failed: No pinentry
Im trying to setup my gnupg configuration on MAC OS 11.2.1
So far I have setup my SSH, I have generated my GPG key and added it into GPG agent.
Now, if I run this command:
echo "test" | gpg --clearsign
I am getting this result:
-----BEGIN PGP…
ragulin
- 2,571
- 2
- 7
- 6
90
votes
5 answers
Clean up my gnupg keyring?
My gnupg keyring contains hundreds of unnecessary entries. How would I remove the expired, revoked and unsigned keys from it?
I would like to keep the keys that have signed my key, and import new keys only as required. I'd previously imported the…
scruss
- 1,097
81
votes
2 answers
gpg: can't import key: "new key but contains no user ID - skipped"
I am trying to import Github's webflow signing key on a fresh install of Raspbian (Debian) Buster.
$ gpg2 --recv-keys 5DE3E0509C47EA3CF04A42D34AEE18F83AFDEB23
gpg: key 4AEE18F83AFDEB23: new key but contains no user ID - skipped
gpg: Total number…
pinhead
- 913
79
votes
1 answer
How do I symmetrically encrypt a file using gpg?
I'm trying to symmetrically encrypt a file using gpg.
$ gpg --encrypt --symmetric $MYFILE
I enter and re-enter a passphrase, then gpg tells me
You did not specify a user ID. (you may use "-r")
Current recipients:
Enter the user ID. End with an…
dave4420
- 1,728
77
votes
4 answers
What are the correct permissions for the .gnupg enclosing folder? gpg: WARNING: unsafe enclosing directory permissions on configuration file
I don't want to just chmod and run until I get the right answer, nor do I want to run GnuPG as root. The easy fix would be to just set it so that only my user can read it, but I don't think that's the best way.
I get the following error when I…
Nathan Basanese
- 1,536
67
votes
1 answer
What do 'ssb' and 'sec' mean in gpg's output?
When listing keys with gpg2 --list-secret-keys, one is presented with a bunch of lines that begin with sec and ssb. What do these mean?
Rob Gilton
- 783
62
votes
5 answers
How to make GnuPG display full 8-byte/64-bit key ID?
How do I make GnuPG (specifically version 1.4.12) display the full, 64-bit (8-byte) key ID for a key on a keyring on my system?
Doing gpg --list-keys --fingerprint XXXXXXXX only displays the 32-bit portion of the key ID, which I already know, and…
user
- 30,336
62
votes
6 answers
What is better for GPG keys - RSA or DSA?
ssh-keygen defaults to creating RSA keys, but gpg --gen-key prefers DSA/ElGamal.
Which one - RSA or DSA - is better for GPG?
grawity
- 501,077