Questions tagged [gnupg]

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.

790 questions
158
votes
8 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,000
  • 3
  • 16
  • 14
141
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,491
  • 2
  • 16
  • 10
129
votes
4 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,037
  • 3
  • 22
  • 26
126
votes
12 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
  • 7,456
  • 6
  • 54
  • 56
106
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
  • 8,599
  • 24
  • 58
  • 86
105
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
  • 2,927
  • 6
  • 28
  • 32
98
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,127
  • 1
  • 11
  • 11
84
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,027
  • 1
  • 8
  • 12
71
votes
1 answer

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
  • 813
  • 1
  • 6
  • 5
66
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,578
  • 3
  • 14
  • 18
65
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,268
  • 1
  • 9
  • 23
63
votes
2 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
  • 1,641
  • 1
  • 5
  • 6
63
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?
u1686_grawity
  • 426,297
  • 64
  • 894
  • 966
62
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
  • 733
  • 1
  • 5
  • 4
61
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
  • 29,449
  • 11
  • 99
  • 144
1
2 3
52 53