Questions tagged [gpg]

GNU Privacy Guard (GnuPG or GPG) is OpenPGP compliant FOSS alternative to PGP encryption software.

Filter by
Sorted by
Tagged with
0 votes
1 answer
36 views

Can I extract the GPG public key if I have an encrypted file, the private key pgp file, and the pass phrase?

I am working on a project where I have been provided with a GPG private key in armor text format, the pass phrase, and a file that was encrypted with the public key. The public key is not available ...
user avatar
1 vote
1 answer
444 views

Update PGP key in self hosted apt repository

We are using the Sonatype Nexus Repository Manager to host apt repositories. The GPG key of one of them has expired recently and needed to be updated. What I thought would be sufficient was to ...
user avatar
  • 121
2 votes
2 answers
300 views

What are required environment variables for GPG?

I'm trying to setup the docker credentials, and it requires to initialize the gpg first. Here are my steps: root@remote_machine:~# gpg --gen-key ...
user avatar
0 votes
0 answers
56 views

s-nail not decrypting netrc.gpg file?

I set up msmtp and s-nail to work with my gmail account. It works if the password is stored in plain text in .netrc, but does not work with .netrc.gpg: echo 'Message body' | mailx -A mymail --subject='...
user avatar
  • 103
1 vote
0 answers
61 views

What is GPG equivalent of ssh-add?

When using password-secured SSH keys I can use ssh-add to preemptively unlock a key before it needs to be used and have it cached in ssh-agent for future use. What is a GPG equivalent of ssh-add? I ...
user avatar
0 votes
2 answers
90 views

Encrypted files stored next to GPG Key in backup – alternative solution?

During a recent test run to see if my personal backups work as intended, I noticed that I store my GPG key next to files encrypted with that key on the same disk. Although the disk is encrypted (LUKS) ...
user avatar
  • 151
0 votes
0 answers
889 views

GPG import skips public key in file (no user ID)

On computer-a a key is generated, linking it to email aaaa@bbbbb.com, using command gpg --gen-key Then it is exported using command gpg --export -a --output public.asc aaaa@bbbbb.com The file is ...
user avatar
  • 1
0 votes
1 answer
643 views

How to get expiry date for yum repo signing keys

I recently had a package signing key expire preventing some automatic updates from installing so am now setting up monitoring to make sure we are alerted if this happens again. On Debian systems I can ...
user avatar
-1 votes
1 answer
175 views

How to generate a dummy GPG key by running a script for testing purposes?

I would like to create a GPG key for testing Nexus3 and N3DR. When I follow instructions like these, a key gets created and it could be used in the Continuous Integration (CI) as well. The question is ...
user avatar
  • 5,691
-2 votes
1 answer
165 views

How fast is decryption by a YubiKey? [closed]

Do YubiKeys decrypt GPG or SSH/SFTP data directly within themselves? If so, would that cause a bottleneck? Do YubiKeys have accelerated AES hardware that does most of the heavy lifting of decryption? ...
user avatar
  • 186
5 votes
4 answers
3k views

Ubuntu add repo app-key fails

On Ubuntu 20.04 LTS, I'm trying to install packages like MongoDB, Sublime Text 3 etc. but before adding them their repo url must be added. I'm trying this command: wget -qO - https://download....
user avatar
  • 173
2 votes
1 answer
449 views

Can't connect to server via SSH using gpg-agent

I'm trying to connect to a VM on Google Cloud. I've created a public key to use for SSH and added the key to the cloud instance. I have SSH_AUTH_SOCK set to the file used by gpg-agent. ~/.gnupg/gpg-...
user avatar
3 votes
2 answers
894 views

Trust gpg key via script

When performing an automated server deployment, I can upload and import gpg keys via script. But I cannot trust keys. I tried gpg --batch --yes --edit-key keyname trust 5 and echo 5 | gpg --batch -...
user avatar
  • 745
1 vote
0 answers
232 views

GPG disabling ssh support for an authentication key coming from a smartcard

When a gpg smartcard (e.g. yubikey) is inserted and contains an authentication key, the key is automatically enrolled by the gpg-agent. That means the key is usable for any ssh operation without ...
user avatar
1 vote
2 answers
323 views

GPG I am trying to create a script to automaticaly associate an imported ssh key to a primary key

I am trying to attach an imported ssh key to an existing primary key. The imported ssh key exists inside ~/.gnupg/private-keys-v1.d/ and is usable through the gpg-agent. When I associate it manually ...
user avatar
0 votes
1 answer
432 views

Is it possible to setup msmtp for proper authentification in a Dockerfile?

I am running a php:7.2-apache container and I want to send mails. As ssmtp is retired, I want to use msmtp but I face authentication problems with msmtp. My goal: Setup msmtp for a docker container ...
user avatar
1 vote
0 answers
79 views

Yubikey won't receive an imported SSH auth key

I had a SSH key which I imported without problems in my GPG keyring as auth key using pem2openpgp from monkeysphere. The imported key works fine. I removed its SSH version from ~/.ssh and switched ...
user avatar
  • 135
1 vote
1 answer
268 views

Use ssh key on GPG card to decrypt data

When a Windows instance is created in AWS, its password is encrypted using the public part of an SSH key. It's then possible to use the following command to retrieve the encrypted password: aws ec2 ...
user avatar
  • 111
2 votes
1 answer
3k views

gpg: no valid OpenPGP data found [closed]

I am trying to make sense of the following two serverfault posts: How to verify a file using an asc signature file? and gpg --import bind-9.9.4.tar.gz.sha1.asc fails with no valid OpenPGP data ...
user avatar
  • 176
0 votes
0 answers
281 views

Fix or explain tty issue and gpg2

I'm having an issue importing or generating gpg secret keys on ubuntu 18.04 with my main (sudo) non-root user. With root user I have no problems with gpg, but non-root and it's basically permission ...
user avatar
  • 101
1 vote
1 answer
523 views

How to lock / unlock a gpg hardware token via script

I would like to execute gpg --card-edit; verify; quit non-interactively to unlock a gpg hardware token (i.e. smartcard or yubikey). My usecase is: Enter a password e.g. via ssh Store it in the ...
user avatar
4 votes
1 answer
7k views

gpg-agent: fatal error in syslog on ssh login

In the syslog for my Ubuntu server, there is an error that appears whenever I log in using an SSH user account. systemd[27299]: usr/bin/gpg-agent failed (exitcode=2): General error systemd[27299]: ...
user avatar
  • 191
7 votes
1 answer
9k views

Unable to generate GPG keys without passphrase on Ubuntu 18.04 [closed]

Has anyone tried creating GPG keys for encrypted pillars on Ubuntu 18.04? I'm using the following command to attempt to generate the keys: gpg --gen-key --homedir /etc/salt/gpgkeys When I run that ...
user avatar
  • 4,296
1 vote
1 answer
637 views

Where does duplicity store the key that it creates?

I started a backup via duplicity without giving it any options. I haven't created any GPG keys myself, so when I ran duplicity, it asked me for a passphrase, then created a key, and successfully ...
user avatar
2 votes
1 answer
341 views

What is the Devuan equivalent of the Debian debian-archive-keyring package?

Debian keeps the keys required for a successful multistrap installation in a package called debian-archive-keyring. (Multistrap is like debootstrap, but it can install packages from multiple ...
user avatar
  • 1,968
4 votes
1 answer
1k views

How do I successfully import public key 94532124541922FB into GPG?

I think I need to have the key 94532124541922FB in my keyring as multistrap is reporting: W: GPG error: http://packages.roundr.devuan.org/merged ascii InRelease: The following signatures couldn't be ...
user avatar
  • 1,968
0 votes
0 answers
173 views

Multiple files encrypted with multiple GPG keys - how to easily add/remove/manage keys, automate key change tasks?

We have a bunch of files that contain sensitive information, that need to be accessed by several teams, but need to be unreadable to everyone else. Currently, each team member needs to generate their ...
user avatar
1 vote
1 answer
503 views

How to export GPG key without user interaction?

I use GPG keys to encrypt backups with duplicity, so I would like to export the key after it is generated, so I can move it to a backup location in case the server burst into flames. Is there any way ...
user avatar
2 votes
1 answer
1k views

How to get only the pub part of gpg --list-public-keys?

Okay, there is probably a better way to phrase this question. I am writing a script to configure my web servers on the first boot, but I hit a snag when generating the GPG key that will be used to ...
user avatar
0 votes
1 answer
3k views

Problematic apt-get update due to missing gpg keys

I accidentally deleted some Debian gpg keys when testing out apt-key del. (I don't remember which key) I have redownloaded the deb package and extracted the gpg keys. Then I used apt-key add to add ...
user avatar
0 votes
1 answer
541 views

Aptly publish asking for password although --passphrase flag is set

I unsuccessfully try publishing an APTLY snapshot (about 80GB) using aptly publish snapshot --batch=true --passphrase="SuperSecretPassWord" --distribution="mydistro" current-snapshot After about 15 ...
user avatar
0 votes
0 answers
194 views

Where is the networker public key?

I am trying to install a networker backup client on linux (CentOS). At the moment I have to use "yum install --nogpgcheck" to do this, since I could not find the public gpg-key for their rpms. ...
user avatar
  • 7,647
0 votes
1 answer
224 views

rhel7 yum repository metadata GPG signatures

I'm trying to sign yum repo metadata using GPG, as part of a Jenkins job. This is proving more difficult than I first imagined, but I'm sure lots of people must have done this already. I've worked ...
user avatar
1 vote
1 answer
279 views

Have Duplicity use user's persistent gpg session when performing full filesystem backup?

I'm trying to set up automatic, full filesystem backups on my local system using Duplicity. I do not want to have to enter my password for it to encrypt a volume: what if I am not at the computer and ...
user avatar
4 votes
1 answer
4k views

How to reposync saltstack? reposync failing with error message `Removing [...], due to missing GPG key.`

On a RHEL 7.4 system, I add the salt-latest repo as follows: yum -y install https://repo.saltstack.com/yum/redhat/salt-repo-latest-2.el7.noarch.rpm Notice, amongst other things, this creates the ...
user avatar
2 votes
1 answer
2k views

How to setup logrotate with GPG to encrypt for GDPR?

As per GDPR all private data should be encrypted, so I need to encrypt all logs and retrieve them for auditing. I have chosen to perform the encryption during log rotation and to use GnuPG as my ...
user avatar
7 votes
3 answers
3k views

Force the use of a gpg-key as an ssh-key for a given server

I configured ssh to use GPG as my ssh-agent and if I remove the ~/.ssh folder, I can ssh into my server fine using my gpg key. However, my ~/.ssh folder has over a dozen different ssh keys in it, and ...
user avatar
9 votes
2 answers
12k views

How to remove a yum repo GPG key?

I have a custom RPM repo in Artifactory, and GPG signing keys were recently enabled. When I ran sudo yum check-updates I was prompted to add the key: Retrieving key from https://artifactory.example....
user avatar
  • 335
32 votes
2 answers
45k views

How to verify a file using an asc signature file?

As an example, this project offers an *.asc file with a PGP signature to verify the contents of the download (as opposed to a checksum, you can see the empty column): https://ossec.github.io/downloads....
user avatar
3 votes
1 answer
1k views

force ssh to use agent, without fallback to directly accessing the IdentityFile

Company policy requires some ssh keys to be stored securely, e.g. on dedicated USB device. Using keys not stored on the host machine works flawlessly using gnupg with enable-ssh-support, even when ...
user avatar
  • 6,553
5 votes
0 answers
3k views

Export Private ed25519 Key From GnuPG For Use in SSH

Is there a way to create an id_ed25519 (not id_ed25519.pub) file from an ed25519 keypair stored in GnuPG? I've started keeping track of my SSH keys in GPG: sec rsa3072 2017-12-12 [C] ...
user avatar
  • 173
1 vote
1 answer
780 views

Querying SKS (PGP key server) database directly?

I have an SKS server set up on Ubuntu 16, currently with a manifest of keys from dumps provided by the MIT PGP key server. I'd like to be able extract public keys / subkeys and associated user info (...
user avatar
  • 197
5 votes
2 answers
1k views

Why do I get this APT warning: Signature by key [...] uses weak digest algorithm (SHA1)?

I'm hosting a private Debian repository for some custom Raspberry Pi code. I originally built the software on Raspbian Jessie (version 8), generated a GPG key which I use to sign the repository, and ...
user avatar
  • 719
0 votes
1 answer
691 views

How can I host my public GPG key on S3?

I've been packaging some proprietary software that runs on Raspbian into .deb files and hosting them in a private S3 bucket using a program called deb-s3. I also use a program called apt-transport-s3 ...
user avatar
  • 719
1 vote
1 answer
2k views

mongodb 10gen repo invalid signature

I am trying to install mongodb on debian from 10gen repo. I have followed the official guide HERE however i am stuck when trying to add the repo in apt. The problem is that the signature is invalid. ...
user avatar
  • 1,624
1 vote
0 answers
238 views

How to auto update the expired GPG keys of APT?

When you create your own APT repo, you have to create a GPG key for it. So you need to import it with: apt-key add yourkey.asc or with a key server: apt-key adv --keyserver keyserver.ubuntu.com --...
user avatar
  • 280
1 vote
1 answer
2k views

GPG signed aptly repository not working as expected

We host some of our own software packages as debs in a repository of our own. For prototyping purposes, we’ve been running “unauthenticated”. Now we're trying to do things more correctly and do the ...
user avatar
3 votes
1 answer
5k views

How to restore a Duplicity backup to a new host?

Had a catastrophic failure on a RAID array and lost everything. Have a full set of backups on S3 via duplicity (2003 files), encrypted with GPG. I have the passphrase and a copy of the private key ...
user avatar
  • 482
0 votes
1 answer
506 views

How to share or encrypt sensitive git repos

My organization is using Openshift for running several applications. Our policy thus far has been to always store sensitive values (DB passwords, API keys, etc) in environment variables and never as ...
user avatar
  • 29
2 votes
1 answer
616 views

Signing debian repository: Avoided SHA1, apt-get update still complaining about weak digest

I maintain a small debian repository for my employer, and we have been facing issues lately due to the SHA1 deprecation. We sign our packages with a 4096bit RSA key. For signing the repository, I ...
user avatar