Questions tagged [gnupg]

GNU Privacy Guard (GnuPG / GPG) is a cryptography suite implementing secret-key cryptography and public-key cryptography. GnuPG is the GNU project's complete and free implementation of the OpenPGP standard as defined by RFC4880. Use this tag for programmatic use of the GPG tool or its library. Questions about direct usage of the GPG tool or its graphical pendents belong on Super User.

GNU Privacy Guard (GnuPG) is a cryptography application. It implements a combination of conventional symmetric-key cryptography for speed, and public-key cryptography for ease of secure key exchange.

GnuPG is the GNU project's complete and free implementation of the OpenPGP standard as defined by RFC4880.

GnuPG allows encryption and signing of data and communication. It features a versatile key management system as well as access modules for all kinds of public key directories. The gpg command line tool has features for easy integration with other applications. A wealth of front-end applications and libraries are available.

See also:

1783 questions
78
votes
4 answers

How to circumvent "apt-key output should not be parsed"?

I'm automating my Docker installation. Something like this: if apt-key fingerprint 0EBFCD88 | grep "Key fingerprint = 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88" > /dev/null then # proceed fi This worked fine in older versions of apt-key,…
Sander Verhagen
  • 8,540
  • 4
  • 41
  • 63
76
votes
1 answer

OpenSSL vs GPG for encrypting off-site backups?

Given the option between using GPG and OpenSSL for local encryption before pushing archives to an off-site backup location, what are the benefits and drawbacks of each solution? Background: I currently manage a server infrastructure based on Ubuntu…
72
votes
2 answers

Remember GPG password when signing git commits

Would it be possible for the GPG password to be saved, so that I am not prompted for the passphrase everytime I make a git commit?
gauge
  • 1,073
  • 2
  • 11
  • 17
70
votes
15 answers

PGP: Not enough random bytes available. Please do some other work to give the OS a chance to collect more entropy

Setup : Ubuntu Server on Virtual Machine with 6 cores and 3GB of RAM. when I am trying to generate a asymmetric key pair via GPG like this gpg --gen-key . I get the following error : Not enough random bytes available. Please do some other work to…
user1524529
  • 897
  • 3
  • 10
  • 12
68
votes
5 answers

GPG error "Not enough random bytes available. Please do some other work to give the OS a chance to collect more"

I am using: gpg --gen-key Is there a better way to create a PGP key? What does this program want? A fully slammed server? Not enough random bytes available. Please do some other work to give the OS a chance to collect more
Tampa
  • 75,446
  • 119
  • 278
  • 425
66
votes
2 answers

How to automatically overwrite the output file when running `gpg` (i.e. without being prompted)?

If I have the same filename in the target directory, decryption fails. The command I'm using to decrypt: gpg --passphrase-fd 0 -o D:/Notification/mytest.txt --batch \ --passphrase-file D:/passphrase.txt -d D:/Notification/mytest.gpg It doesn't…
Rider
  • 863
  • 1
  • 11
  • 16
65
votes
5 answers

"gpg: signing failed: Inappropriate ioctl for device" on MacOS with Maven

I have installed GPG via Homebrew with brew install gpg. It is installed in version 2.2.17. In my Maven POM I have this snippet: org.apache.maven.plugins maven-gpg-plugin
Harold L. Brown
  • 8,423
  • 11
  • 57
  • 109
64
votes
5 answers

No public key: Key with id: (XXXXX) was not able to be located (oss.sonatype.org)

I am trying to push my staging repository on oss.sonatype.org to central repository, but this action is getting failed and i am getting following exception Event: Failed: Signature Validation typeId signature-staging failureMessage No public key:…
Umesh Awasthi
  • 23,407
  • 37
  • 132
  • 204
64
votes
8 answers

How to make gpg prompt for passphrase on CLI

The encryption tool of gnuPG package gpg prompts for passphrase using a GUI dialog box when invoked by a regular user, however when invoked by root it prompts on CLI. How to make it use the CLI even when invoked by a regular user. version:GnuPG…
Mayank Pundir
  • 641
  • 1
  • 5
  • 4
63
votes
3 answers

Suppressing GPG signing for Maven-based continuous integration builds (Travis CI)

I'm using Travis-CI to provide continuous integration builds for a few Java open source projects I'm working on. Normally this works smoothly, but I have a problem when the POM specifies GPG signing, e.g.
mikera
  • 105,238
  • 25
  • 256
  • 415
61
votes
1 answer

How to transfer pgp private key to another computer?

I read this article (archived link) which explained very well how to setup PGP on macOS. But I'm planning to use the keys generated for signing Git commits, so I figure I need to transfer the keys to other computers. Is this correct? And, if so,…
erikvold
  • 15,988
  • 11
  • 54
  • 98
61
votes
12 answers

gpg decryption fails with no secret key error

I have a gpg .key file that is used as passphrase for decrypting a .dat.pgp file. The encrypted .data.pgp file gets successfully decrypted on one server with same .key file using following command cat xxx_gpg.key | /usr/bin/gpg --batch --quiet -o…
fortm
  • 4,066
  • 5
  • 49
  • 79
57
votes
3 answers

Are exported private keys in GPG still encrypted?

Are the exported private keys gotten by executing gpg --export-secret-keys still encrypted and protected by their passphrase? This seems to be the case but I can't find anywhere that explicitly confirms this. If the exported keys are still encrypted…
Matuku
  • 919
  • 2
  • 7
  • 8
55
votes
3 answers

Prevent git from asking for the GnuPG password during signing a commit

Git always asks me to enter a passphrase to unlock my secret key while signing a commit using. git commit -S -m 'message' How can I store in cache the password so that I don't have to enter it each and every time while signing the commit
pokemon
  • 710
  • 1
  • 5
  • 10
52
votes
3 answers

How to sign git commits from within an IDE like IntelliJ?

Question How do I sign git commits using an IDE like IntelliJ on Windows? If you're interested, read what I tried here: I followed mainly Github's guide. I made sure to not forget to restart bash/IntelliJ after you changed config files. Generate…
PHPirate
  • 7,023
  • 7
  • 48
  • 84