Questions tagged [gpg]

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 (like mail user agents). There is a standalone version (1.x) and one (2.x) requiring gpg-agent for secret key handling.

159 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8
votes
0answers
5k views

GPG - “pacman-key --refresh-keys” fails with “gpg: keyserver refresh failed: Permission denied”

I'm currently having issues with installing a package due to a missing key. My first plan was to updating my keyring however "pacman-key --refresh-keys" fails: [user@hostname ~]$ sudo pacman-key --...
8
votes
0answers
1k views

Smartcard “sharing violation” when using OpenSC and GnuPG

On my Linux machine (Arch Linux, up to date as of this post) I am having trouble using both the OpenSC PKCS11 module and GnuPG. It seems like while an app using the PKCS11 module is started (in my ...
8
votes
1answer
434 views

How to make PGP's output less verbose in mutt with GnuPG & TOFU?

I recently added trust-model tofu+pgp in my .gnupg/gpg.conf to use TOFU and automatically trust (marginally) keys from e-mails I see for the first time. It has the bad consequence of making PGP's ...
7
votes
1answer
82 views

How can I see queries to gpg-agent?

I am using gpg-agent together with a Yubikey to securely store my GPG keys. In addition I've enabled so that whenever a authentication, sign or decryption request happens I must physically push the ...
7
votes
0answers
3k views

gpg2 decryption timeout/no secret key

I'm having an issue decrypting files with gpg2. I originally encrypted the files with gpg version 1.4. The machine I'm on now has both gpg (1.4) and gpg2. Decryption with gpg works just fine, but ...
6
votes
0answers
5k views

S.gpg-agent.browser not found while adding ppa in debian

I am using debian strech. I try to add repostory for vim with python support , while adding I encountered gpg-agent.browser not found error sudo add-apt-repository ppa:pi-rho/dev [sudo] password ...
6
votes
0answers
1k views

Open a LUKS volume as a non-root user?

I'm using cryptsetup to create a LUKS file-based device to stash information in: # create a file as a container dd if=/dev/zero of=zulu.bin bs=1024 count=102400 # create a key dd if=/dev/urandom bs=1 ...
5
votes
1answer
380 views

Can mutt automatically sign emails that it encrypts?

I love the mutt option crypt_opportunistic_encrypt. This allows me to automatically encrypt emails to recipients for whom I have the key. (And not if I cc to a group that contains members without keys....
5
votes
0answers
663 views

Intermingled input when using local gpg-agent from remote site

I'm starting a local gpg-agent on my Mac, with the extra-socket option. Then I connect to a remote site using SSH, forwarding the remote S.gpg-agent socket to the local S.gpg-agent.extra socket. This ...
5
votes
0answers
79 views

Password dialogs block keybindings

I am using XMonad 0.11, but this might be unrelated. I am using evolution 3.12.2 and this is related, but the problem might be more general. After research, it appears that the window in question is ...
4
votes
0answers
349 views

Enigmail Thunderbird pinentry requests all passwords to all secret keys

I want to read a GPG encrypted email using Thunderbird Enigmail from Account.1@mail.com and Edit > Account Settings > Account.1 > OpenPGP Security has "Use specific OpenPGP key ID" selected. However, ...
4
votes
0answers
258 views

Reading GPG passphrase from the physical keyboard in OpenBSD

I'm using Synergy to control an OpenBSD desktop from a Linux computer (think of it like a VNC client/server). That is to say what I type on the keyboard goes through a network connection before it ...
3
votes
2answers
44 views

Logging shell sessions encrypted?

I log all my shell activity using script, but am worried that there are quite a few passwords and other secret stuff in these log files. Does anybody know of any way of logging the shell sessions in ...
3
votes
0answers
753 views

Can't sign/encrypt unless I start gpg-agent manually

I recently set up Ubuntu in a VM for development work, but found that git couldn't sign my commits. Investigating further, I found that gpg-agent wasn't able to request my passphrase via pinentry-...
3
votes
0answers
630 views

How can I suppress the pinentry dialogue box if there is no gpg password?

I'm using (neo)mutt with GPG. I've set my gpg password to empty, but when I attempt to decrypt an incoming email, mutt still presents a pinentry dialogue box. If I just press Enter (with no string), ...
3
votes
0answers
471 views

How to set up keyserver and port permanently

I have corporate firewall which blocks default port for apt-key. So each time I add PPA, I have to interrupt gpg (which hangs) and receive missed keys manually setting port 80. I created script which ...
3
votes
0answers
239 views

How to run keychain from gdm ?

I have keychain manage both ssh-agent and gpg-agent. It's working from a shell, with a line like: eval `keychain --eval --agents ssh,gpg id_rsa my_gpg_key` in ~/.bash_profile. I'd like to have ...
3
votes
0answers
1k views

How do I combine SSH agent forwarding and gpg-agent?

I have an ssh-agent running on my local machine. I connect to a remote machine via SSH, with agent forwarding enabled. On that remote there is an instance of gpg-agent running. I know that recent ...
3
votes
1answer
283 views

What GPG agent does Elementary Luna use?

Whenever I try decrypting or signing files with GPG in Elementary Luna, I see a graphical password prompt come up for my GPG key. The key is then cached in memory for future requests for some time. ...
3
votes
2answers
109 views

Securely viewing an encrypted file

I have a file that is gpg encrypted. I would like to view the content of the file, but leave no trace of the output. Lets say for example that the encrypted file has some passwords, and I don't want ...
3
votes
0answers
2k views

reprepro and gpg-agent - passphrase won't be cached

I'm getting a little frustrated here, maybe you got an idea what the problem could be: I have a buildprocess with a few reprepro commands at the end The buildscript is executed with sudo ( cd "$...
2
votes
0answers
59 views

How can I use GPG agent forwarding over ssh when systemd owns the remote sockets?

I'm trying to follow these guides and answers https://wiki.gnupg.org/AgentForwarding https://superuser.com/questions/161973/how-can-i-forward-a-gpg-key-via-ssh-agent https://gist.github.com/...
2
votes
0answers
28 views

Is it possible to check for the presence of a cached GPG key without modifying the GPG timer?

I only know a way* of getting the information of the presence of a cached GPG passphrase, that is, to run $ gpg-connect-agent 'keyinfo --list' /bye S KEYINFO 01B3BE66C2EAC153C4ED25F01FEE13D356EF289F D ...
2
votes
0answers
346 views

User input in cronjob

I have created a script which calls another script.I'm implementing this via below cronjob 55 12 * * * cd /backup2 && ./script2.sh The another script ,I'm calling(restore1.sh) requires ...
2
votes
0answers
117 views

Renaming trusted.gpg to trusted.gpg-broken

I ran a fresh install of Debian stretch 9.8.0 and all was well. I then ran sudo apt update and I get an output which hits the ftp.debian.stretch server for the update thing is it tells me unable ...
2
votes
0answers
220 views

How to forward GPG to a linux machine from Windows?

Here is my set up: Windows 10 machine, my desktop PC. Ubuntu 18 machine, this is my home server Yubikey, has my private GPG keys on it My work flow is as follows: Plug in my Yubikey into USB port ...
2
votes
2answers
1k views

Where does GPG Agent store the passphrase — I need to restore it

I forgot my GPG key passphrase. I know my computer is storing it somewhere because I decrypt strings with it, without a password, for example: $ gpg --decrypt -r me@example.com ~/.password-store/...
2
votes
0answers
1k views

How do I verify linux kernel signature with gpg?

Following the notes at the kernel.org site, but I cannot seem to verify the signature of the kernel. I tried to use the given script to handle it for me, but that has failed too. user@localhost ~ $ ...
2
votes
0answers
132 views

Backing up GnuPG

I am not sure how to securly backup my .gnupg folder or to be specific my private key. I googled and found that people recommended just copying the whole .gnupg folder. Is there a safer way to Backup ...
2
votes
0answers
96 views

Why does gpg --card-status require dbus to be restarted?

When I log in with my (usb) yubikey 4 inserted, I can run gpg --card-status and it gives the expected result. If I remove the yubikey and run gpg --card-status it, correctly, tells me that there is no ...
2
votes
1answer
733 views

Verify gpg key from stdin

I'm using these commands in a Dockerfile to add the LLVM Ubuntu package repository: RUN echo deb http://apt.llvm.org/artful/ llvm-toolchain-artful-6.0 main > \ /etc/apt/sources.list.d/llvm....
2
votes
0answers
679 views

GnuPG 2.1.20 ssh agent forwarding with yubikey on OSX fails

Tried out ProxyJump as suggested by @JensErat. I configured it like this in ssh config: Host jump-to-server HostName server.hostname ProxyJump ubuntu@jump.hostname User ubuntu But it does not work, ...
2
votes
1answer
2k views

Problem with gpg when using apt

I'm scratching my head to find a way to correct broken gpg stuff in apt. When i try to install Nodejs : curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - sudo apt-get install -y ...
2
votes
0answers
125 views

Let polkit/pkexec use another application to ask for my password

I would like pkexec (polkit) to always ask for my password through a particular application and not through the default one. What I need is the equivalent of sudo --askpass. I would like that so that ...
2
votes
0answers
459 views

How to login with passphrase?

I use GPG a lot so I need to enter my passphrase many times (even though I use gpg-agent). My issue is that to login on my desktop, I need to enter my user password, then my passphrase. I wonder if I ...
2
votes
1answer
562 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
0answers
51 views

Use GnuPG by default in Evolution

Is there a way to make Evolution default to encrypting messages with GnuPG? It'd be acceptable if Evolution complains and refuses to send unencrypted emails to addresses for which it lacks a gpg ...
2
votes
0answers
2k views

Decrypting with GPG after a “su - different user”

I have cron job running a script in the cron of "USER A" that encrypts many files in a loop using the gpg command below: gpg --batch --cipher-algo AES256 --passphrase "PASSWORDISHERE" -c FILENAME "...
2
votes
2answers
680 views

Hard drive partition and updating trouble

I'm new to linux and am using Linux Mint 15 Olivia. I am running it alongside windows 7 and I want to increase the size of my current linux hard drive partition. I read somewhere that I should install ...
2
votes
0answers
217 views

What does apt need to be healed of a bad setup?

I made a couple of earlier posts regarding a libssl-dev that, it seemed, was not removable. Some of the replies touched on that there was a problem with apt, and now that someone posted the command to ...
1
vote
0answers
64 views

Parabola GNU/Linux-libre installation: problem with key

I'm trying to install Parabola GNU/Linux-libre (OpenRC) and I repeatedly get this error during pacstrap /mnt base elogind udev-init-scripts. error: some-package: signature from "A Packager <a-...
1
vote
1answer
176 views

gpg/pinentry - Can't enter passphrase outside terminal

I am trying to decrypt a gpg file inside a script. When I run gpg -d file.gpg in the terminal, I get prompted to enter the password in a curses dialog box. But when I run a script containing that line,...
1
vote
0answers
523 views

Import PGP Keys with no user id into gpg

My company used Authora Edge to create / manage pgp keys. The company unexpectedly closed, and we are in the process of migrating the existing keys into gpg. When trying to import the public keys, I ...
1
vote
0answers
247 views

Decrypting a file with GNU PGP inside a container: gpg: no valid OpenPGP data found

I'm trying to decrypt a file with a GPG private key I was given and a passphrase. We are using a Docker container running ubuntu 18.04 LTS for our decryption process. The docker container runs a shell ...
1
vote
0answers
258 views

How to run gpg agent with custom config when the agent starts automatically after running a specific gpg command?

From the documentation, I can run gpg-agent with custom config like this and I think this is the official way: The following gpg-agent.conf contains this: allow-preset-passphrase default-cache-ttl ...
1
vote
0answers
191 views

Using gpg through proxy with non-root user not working

For a bit of context: I'm trying to install Spotify with yay, and it says some PGP keys need to be imported, but it's failing saying "no keyserver available". Sure enough, if I manually call gpg --rcv-...
1
vote
0answers
283 views

gpg-agent on start up without open session

Environment Ubuntu Server 18.04 gpg2 v2.2.4 pass v1.7.1 Question Is there a way to start gpg-agent --supervised on startup ? When I try to start gpg-agent --supervised, I get : gpg-agent (GnuPG) ...
1
vote
0answers
8 views

GPG passphrase is not provided during Key Generation and is not working as expected

I have created a gpg Key without providing any passphrase. But while generating Digital Signature file I am passing some extra character with --passphrase on the command line. Still I am able to ...