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
27
votes
1 answer

Can't import gnupg keys due to ascii conversion?

I have a problem importing my gpg keys onto my macbook pro. This is the output: pg: conversion from `utf-8' to `US-ASCII' failed: Illegal byte sequence gpg: key 5AE36741: public key "Micha\xc5\x82 Adamczyk " imported After…
27
votes
2 answers

Encrypt files using PGP in PHP?

I want to use PGP encryption to encrypt a CSV files, I am generating through a PHP script and then send that file to client via email. Client will give me the encryption key, which I need to use for encryption files. I Googled about PGP and found it…
djmzfKnm
  • 26,679
  • 70
  • 166
  • 227
26
votes
1 answer

gnupg gives me the error "Invalid public key algorithm" when I try to use an old key

When I try to decrypt an old file, gpg2 gives me this error: gpg: public key decryption failed: Invalid public key algorithm gpg: decryption failed: No secret key gpg1 gives me this error: gpg: Ohhhh jeeee: no decrypt() for 17 secmem usage:…
aaronsw
  • 4,455
  • 5
  • 31
  • 27
26
votes
6 answers

'Git: gpg failed to sign the data' in visual studio code

After a fresh Linux install I'm trying to set up my environment and I keep getting the Git: gpg failed to sign the data error upon committing changes locally. I'm using Visual Studio Code, proprietary, not opensource version. .gitconfig: [user] …
djweaver
  • 297
  • 1
  • 3
  • 8
26
votes
7 answers

How to run gpg from a script run by cron?

I have a script that has a part that looks like that: for file in `ls *.tar.gz`; do echo encrypting $file gpg --passphrase-file /home/$USER/.gnupg/backup-passphrase \ --simple-sk-checksum -c $file done For some reason if I run this script…
Marcin
  • 7,874
  • 7
  • 45
  • 49
25
votes
3 answers

Android Studio and Git - How do I GPG-sign my commits?

According to this link, I simply need to include the -S switch to sign my commit using my GPG key, but I don't see how I can use that in Android Studio. How do I sign my commits in Android Studio? EDIT: I appreciate that OSX solutions are coming…
Aloha
  • 864
  • 18
  • 40
25
votes
5 answers

gpg no default secret key error using maven

I am trying to publish my maven project in the Central Repository and I need to sign my artifacts. I have downloaded and installed gpg and created my keyring. When I run a "maven clean deploy" in Eclipse, I get the following error: gpg: no default…
Miguel Velez
  • 586
  • 2
  • 8
  • 19
24
votes
6 answers

No GPG passphrase prompt in Visual Studio Code on Windows 10 for signed git commits using WSL2

I am unable to use signed commits within Visual Studio Code when committing code in WSL2 from Windows 10. THE ISSUE No passphrase prompt is shown within Windows 10 resulting in git failing with error: gpg failed to sign the data SETUP Windows…
39digits
  • 783
  • 2
  • 5
  • 13
24
votes
4 answers

"gpgkeys: key 7F0CEB10 not found on keyserver" Response while try to install mongodb on Ubuntu

I am trying to install mongodb on my Ubuntu 12.04 Desktop edition. Firstly I hope there isn't any issue w.r.t. installing mongodb on Ubuntu Desktop edition. I am following the mongodb manual to install it on my Ubuntu machine. When I try to import…
kausal_malladi
  • 1,542
  • 3
  • 14
  • 30
23
votes
5 answers

How to use GPG key in github actions?

I am trying to do a maven deploy via GitHub actions and i am getting the below error:- gpg: directory '/home/runner/.gnupg' created gpg: keybox '/home/runner/.gnupg/pubring.kbx' created gpg: no default secret key: No secret key gpg: signing failed:…
Rishab Prasad
  • 771
  • 1
  • 8
  • 21
23
votes
5 answers

Git GPG signing fails without a clear message

If I set my Git to sign with my GPG key it fails. I've tried GIT_TRACE and it doesn't really give me any more info: $ GIT_TRACE=1 git commit 15:29:35.112157 git.c:344 trace: built-in: git 'commit' 15:29:35.115745 run-command.c:626 …
Boris
  • 737
  • 6
  • 18
23
votes
3 answers

How do I install and use gpg-agent on Windows?

I'm trying to start signing Git commits. I setup a GPG key with keybase.io and have it synced on my local machine and on my Git server. Now, I'm trying to solve the problem of typing the key passphrase on every single commit. PS> git commit -m…
Anthony Mastrean
  • 21,850
  • 21
  • 110
  • 188
23
votes
2 answers

Git signed commits - How to suppress "You need a passphrase to unlock the secret key..."

I changed my global Git configuration to sign all commits. I also use gpg-agent so that I don't have to type my password every time. Now every time I make a new commit I see the following five lines printed to my console: [blank line] You need a…
friederbluemle
  • 33,549
  • 14
  • 108
  • 109
22
votes
6 answers

what is the best/easiest to use encryption library in python

I want to encrypt few files using python what is the best way I can use gpg/pgp using any standard/famous python libraries?
Anurag Uniyal
  • 85,954
  • 40
  • 175
  • 219
22
votes
8 answers

"No secret key" error when signing git commit on Windows

I'm getting this error when trying to sign a commit: git commit -S -m "test" gpg: skipped "EF617ACA9EC3XXXX": No secret key gpg: signing failed: No secret key error: gpg failed to sign the data fatal: failed to write commit object This is the…
giveall
  • 404
  • 1
  • 3
  • 8