date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,518,116,339,000 |
How to encrypt a file using the command below, if the recipient mail is not showing up when I type the --list-keys command.
Sample Encrypt file command using GPG
gpg --output "output_filename" --encrypt --recipient [email protected] "input_filename"
Output for gpg --list-keys shows to imported public keys one is Use... |
You can use the identifier instead of an email address:
gpg --output "output_filename" --encrypt --recipient FXXXXX3D "input_filename"
(You should really specify the full fingerprint but that's another story.)
| How to encrypt if public key does not have email |
1,518,116,339,000 |
To install insync on my debian , i need to add an external repo . Please, save me the part that external repos can be harmful etc etc. I just need this repo.
The problem is that when I try to import the gpg key, the process freezes.
This is the state of the operation, it's been stuck for half an hour.
ale@debian:~... |
To install insync on debian , run the following command:
echo "deb http://apt.insynchq.com/debian $(lsb_release -cs) non-free" | sudo tee -a /etc/apt/sources.list
sudo apt-get install insync
| importing gpg key freezes the terminal |
1,518,116,339,000 |
Im decrypting a file sent by a client using gpg. The file is Obviusly encrypted, and theoretically, using my public key.
I have installed both his public key and my private key.
So, im running:
/usr/local/bin/gpg --output a.log --decrypt --passphrase=mypassphrase --batch /usr/local/log/Banesco11052015.TXT.pgp
gpg: e... |
Effectively, as @PSkocik, the file was empty.
Apparently, those 900 bytes on it were header information regarding the encryption.
Thank you all!
| GPG decrypt returns empty file |
1,518,116,339,000 |
Why does setting umask to 0077 makes a gpg public key unavailable for apt when installing a package, e.g.
umask 0077
curl -fsSLo /usr/share/keyrings/brave-browser-beta-archive-keyring.gpg https://brave-browser-apt-beta.s3.brave.com/brave-browser-beta-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave... |
apt runs download-related operations using a sandbox user by default, _apt. I can’t check right now, but it’s possible that apt update key verification is done using this user too, which would mean the keys have to be readable by the _apt user.
See Why are directory permissions preventing "sudo apt install" using a fi... | Why does setting `umask` to `0077` (and then downloading public key) makes a gpg public key unavailable for apt? |
1,518,116,339,000 |
Pardon me if this is not possible. My goal is to utilise pass. From the conducted research, it appears that the pass command utility will require a GPG key before you can store your sensitive data.
Now, in order to generate a GPG key, one would run the following command
gpg --full-generate-key
which is a pre-requisit... |
What you are trying to do is unfortunately not possible.
AES256 is a symmetric-key algorithm, i.e. the same key is used for encrypting and decrypting.
The --generate-key or --full-generate-key option of gpg is used to create an asymmetric public/private key pair, where the public key is used for encryption and the pr... | How to specify AES-256 algorithm when creating GPG key? |
1,518,116,339,000 |
We have a self-hosted Debian repository, from where we are fetching all the packages.
While running the "apt update" on target machine, we are getting below error-
W: GPG error: http://URL_FQDN/dev/debian stretch InRelease: The following signatures were invalid: EXPKEYSIG 0DD91A7623XXX9F606 devkey <[email protected]>
... |
The key used to sign your repository’s artifacts has expired:
pub rsa3072 2020-09-28 [SC] [expired: 2022-09-28]
B899 E7EA 6FFC D59A 152B B25A 0DD9 1A76 XXXX F606
uid [ expired] devkey <[email protected]>
You need to renew it, and update it wherever it’s used. To move the key’s expiration date, edit... | GPG error- The following signatures were invalid: EXPKEYSIG |
1,518,116,339,000 |
This is the content of my .gnupg/gpg-agent.conf:
pinentry-program /usr/bin/pinentry-curses
When I try to retrieve a password from pass' store, e.g. via pass -c path/to/password in a very small-sized terminal window, the command errors like this:
gpg: decryption failed: No secret key
So it's an error from GnuPG, caus... |
Whenever you report a (suspected) bug, you should state the behavior you observe and what you expected instead. So in this case, and as you opened a bug report with GnuPG, you should state what you think should happen. If you add it here, you should edit the question, not add it only in a comment. See also the suggest... | Strange error with GnuPG: claims "no secret key" when terminal is too small |
1,518,116,339,000 |
I run a couple of PCs and they both multi-boot into more than one OS (Win10/Linux{Devuan}/FreeBSD & Win10/Linux{Devuan} respectively). I use Thunderbird + Enigmail (sticking with Version 68.x of the former for the moment as the integrated OpenGPG support coming in 78.x does not have SmartCard support working yet as I ... |
Well, if I understand correctly you have two different questions.
If you generated the keys directly on the card you won't be able to back them up. If on the other hand you generated the keys on an airgapped PC and made copies to external media, then you can always retrieve them and write them to a new smart card
In ... | How to import secret key on OpenGPG smartcard (copied from one machine/OS to another)? |
1,518,116,339,000 |
Say I encrypt a file using my private GPG key on my desktop. I then transfer the file to my laptop, and intend to decrypt it. What do I do? I heard something about "exporting a public key", what does this mean? Do I use the private key on my laptop as well? If I do, how do I put the private key from my desktop onto my... |
Encryption is done with the public key.
Decryption with the private key.
Keys can bei exported to files and imported on another machine.
It's possible to upload the public key to a keyserver.
listing keys (find your id after "/")
gpg --list-keys
export private key (replace 12345ABCD with your id)
gpg --export-secret-... | Using GPG keys on multiple devices? |
1,518,116,339,000 |
Updating repositories with apt update fails since the public keys of several signatures are not available.
$ sudo apt update
Get:1 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Ign:2 http://deb.debian.org/debian stretch InRelease ... |
You need to install Debian’s version of debian-archive-keyring, the package containing the archive keys. You currently have Ubuntu’s. (debian-keyring contains the developers’ keys.)
You’ll probably have to download it manually and install it using dpkg -i (as root, or using sudo).
As a longer-term fix, you should eith... | Importing keys from keyring.debian.org fail |
1,518,116,339,000 |
So I executed gpg --keyserver keys.gnupg.net --recv id as root and get this:
gpg: directory '/root/.gnupg' created
gpg: new configuration file '/root/.gnupg/dirmngr.conf' created
gpg: new configuration file '/root/.gnupg/gpg.conf' created
gpg: keybox '/root/.gnupg/pubring.kbx' created
It's stuck after the last... |
The isse you describe might very well be a firewall issue (if you wait long enough, is there a timeout message?). keys.gnupg.net in fact points to pool.sks-keyservers.net (technically implemented as a CNAME alias in DNS):
$ dig CNAME keys.gnupg.net
; <<>> DiG 9.10.3-P4-Debian <<>> CNAME keys.gnupg.net
;; global optio... | GPG key import stuck at "gpg: keybox '/root/.gnupg/pubring.kbx' created" / Getting "gpg: keyserver receive failed" |
1,497,996,244,000 |
Example :
bash$ gpg --batch --edit-key alice quit >/dev/null 2>&1
Secret key is available.
pub 2048R/9F07612A created: 2017-06-20 expires: never usage: SCEA
trust: ultimate validity: ultimate
sub 2048R/23B3A24B created: 2017-06-20 expires: never usage: SEA
[ultimate] (1). ... |
Probably by writing to /dev/tty or equivalent, that's what ssh does.
$ hi() { echo hello > /dev/tty; }
$ hi &>/dev/null
hello
On Linux, at least, opening /dev/tty opens the controlling terminal of the process.
| How does GnuPG outputs to console while stdout and stderr are both redirected to /dev/null |
1,497,996,244,000 |
I'm running NetBSD on a Xen VPS, and I'm trying to generate a gpg keypair. I've gotten most of the way there, but now I'm getting the following error message:
Not enough random bytes available. Please do some other work to give the OS a chance to collect more entropy! (Need 300 more bytes)
This has been the status f... |
It should not. I would try restarting the process. In addition to that, there is not so much you can do, in addition to digging to source code to see what is wrong.
As you probably already know, if your server is completely empty, it is possible that generating random data takes long time. However, installing packages... | How long should it take to generate 300 bytes of entropy on a VPS? |
1,497,996,244,000 |
I want to import/refresh a gpg key from a keyserver including all non self-signatures.
Whenever I try to do this gpg says, for example
gpg: key <number>: number of dropped non-self-signatures: 24
[...]
gpg: Total number processed: 1
gpg: unchanged: 1
As per the documentation this seems to be a desirable ... |
Solved it. The right flag was --keyserver-options no-self-sigs-only, so for example
gpg --verbose --keyserver-options no-self-sigs-only --keyserver keyserver.ubuntu.com --refresh-keys
| GPG drops all non-self-signatures |
1,497,996,244,000 |
I have added a new source
deb http://httpredir.debian.org/debian buster-backports main contrib
to my source list file on my raspberry pi. When I update my sudo apt to confirm the changes, I get this error:
sudo apt update
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Get:2 http://httpredir.debian.or... |
I found the answer:
The package manager needs to have the PGP keys to verify package sets from the new repository.
You first have to fetch the keys from a keyserver, e.g. the SKS one:
$ gpg --recv-keys --keyserver ipv4.pool.sks-keyservers.net 04EE7237B7D453EC
gpg: key E0B11894F66AEC98: public key "Debian Archive Autom... | GPG keys new key but contains no user ID |
1,497,996,244,000 |
I'm trying to get my GPG configuration back to a sane size. I've just converted pubring.gpg to pubring.kbx using migrate-pubring-from-classic-gpg, but despite only containing a few dozen public keys those files are both almost 30 MB. Please correct me if I'm wrong about the normal size of keys, but I suspect this migh... |
On-disk key sizes are related to the number of signatures, so one way to find out which keys to investigate is to run something like
gpg2 --with-colons --list-keys --with-sig-list |
awk -F: 'function dump(key, uid, sigs) {
if (key && uid) {
printf "%s: %d (%s)\n", key, sigs, uid
}
... | How to get GPG public key sizes? |
1,497,996,244,000 |
I installed the Enigmail mail encryption plugin for Thunderbird and created a key-pair as the installation wizard instructed me. I can send and encrypt/decrypt mail with this key.
However, when I want to list my keys in the terminal using gpg --list-keys I get no output what so ever.
Why?
|
Enigmail's plugin separates itself from the standard gpg keyring.
That's why you don't see any output.
If you for any reason want to have your public (and private) key stored also in the gpg keyring, just do the following, supposing you have your public and possibly even private key stored in one file named MyNewKey.a... | I created a encryption key-pair in Enigmail, but I can't see it when I do `gpg --list-keys` in terminal |
1,497,996,244,000 |
I'm trying to add a key to gpg:
$ gpg --recv-key 12345
gpg: keyserver receive failed: No keyserver available
Then I do this:
$ gpg --list-keys
gpg: /home/me/.gnupg/trustdb.gpg: trustdb created
but the error remains. How can I can fix it?
|
You should specify a keyserver to use.I typically use --keyserver wwwkeys.uk.pgp.net (you can use a lot of different country codes instead of uk, but I know that one works).
| Unable to add a key to gpg |
1,497,996,244,000 |
Is it possible to encrypt pictures and other files like audio etc with GPG? If yes then how to? If not then why not?.
|
Yes this is possible. gpg normally handles files as binary and you don't have to do anything special to encrypt pictures or audio.
gpg -c yourfile.mp3
for symmetric encryption and
gpg -e yourfile.mp3
to encrypt with your (pregenerated) private key.
| Encrypt multimedia files with GPG |
1,497,996,244,000 |
I want to change my gpg passphrase so I do
tweedleburg:~/.gnupg # gpg --list-secret-keys
/root/.gnupg/secring.gpg
------------------------
sec 1024D/43E855BB 2008-02-03
uid Thorsten Staerk <[email protected]>
ssb 2048g/2220D430 2008-02-03
So I do have a secret key and a user id. But gpg is not ac... |
Specify the numeric id:
gpg --passwd 43E855BB
| gpg will not let me change my passphrase |
1,497,996,244,000 |
I have copied my GPG keys from 1 server to another, on the first server everything is working correctly, on the new I get the following:
(I have included the output of list-keys and list-secret-keys
[www@localhost data]$ gpg escs_hr_feed.pgp
You need a passphrase to unlock the secret key for
user: "Encrypt <[email pr... |
So the problem turned out to be that if you sudo su - to the user, you cannot use gpg, you need to log directly in as the user.
(At least on my companies server setup)
| GPG keys copied, not working |
1,497,996,244,000 |
I have about twenty files symmetrically encrypted with CAST5. I have a single passphrase that is meant to work with all of the files and I wish to confirm that it does. I wrote a script to perform a check a check on each file.
read pass
for file in *.gpg ; do
if ! gpg --batch --passphrase "$pass" -d "$file" &>/dev/... |
Unfortunately there is no way of asking gpg-agent whether a key is passphrase protected. But you need not check the files but each key once only. Thus you should first check which keys are involved. There is no need to check the same key twice (by using it to decrypt two files).
I have to admit that though I consider ... | Checking if a passphrase is able to decrypt symmetrically encrypted files |
1,497,996,244,000 |
I have a licence that I'm signing with:
gpg --default-sig-expire "2024-02-14" --sign licence
This results in:
$ gpg --verify licence.gpg
gpg: Signature made Tue 13 Feb 2024 08:18:39 AM CET
gpg: using RSA key 1234567890ABCDEF1234567890ABCDEF
gpg: issuer "[email protected]"
gpg: Good signa... |
The only format accepted by --default-sig-expire with a time specification is YYYYMMddTHHmmss[Z]:
gpg --default-sig-expire 20240214T130000 --sign license
Any timezone specifier is ignored, and daylight savings time is ignored too; so currently in Europe this produces an expiration time one hour later than the time sp... | gpg expiration TIME? |
1,497,996,244,000 |
Suppose Bob got a message from Alice encrypted with his public key and signed with her private key. Now he wants to prove to Charlie that he got a message from her with this exact content. The message was created via gpg --sign --encrypt.
My idea was that he could decrypt the message and save it with its signature som... |
This was pretty hard to find. It is not in local man gpg.
The command:
gpg -vi --unwrap msg1.gpg
(-v means verbose, -i is interactive, does not overwrite files.)
Caveat: You might(?) need to decompress the output sometimes.
Documentation:
https://gnupg.org/documentation/manuals/gnupg.pdf
--unwrap This command is... | Convert encrypted and signed to just signed PGP message |
1,497,996,244,000 |
An issue based on this post.
If you want to trust a public key, two commands can achieve the target:
gpg --edit-key someone's_public_key
gpg --sign-key someone's_public_key
The obvious point that i can find is you have 6 choice to choose in --edit-key:
gpg> sign
1 = I don't know or won't say
2 = I do NOT tr... |
My man gpg says:
--sign-key name
Signs a public key with your secret key. This is a shortcut version of the subcommand "sign" from --edit.
As there is no option --edit, but there are --edit-key and --edit-card, I'd assume they meant --edit-key, and it is indeed the same (modulo defaults for choices).
| The difference between sign-key and edit-key |
1,497,996,244,000 |
I would like to use apt-cacher as my package proxy locally. Especially when I rebuilding my Docker image several times in a row. I have apt-cacher installed and running on my system.
I set my proxy address to: http://melroy-pc:3142 (melroy-pc is my hostname). In my case I create a /etc/apt/apt.conf.d/02proxy file:
Acq... |
As @cas pointed out, Docker host is typically using a private IP address in another local IP block. And by default apt-cacher after version 1.7.0 is using allowed_hosts = '' as default value instead of *.
Solution for me: uncomment allowed_hosts setting and put the value to * in /etc/apt-cacher/apt-cacher.conf file:
a... | Unable to use apt-cacher |
1,497,996,244,000 |
In the past gpg/gpg2 used to run flawlessly on my MacOS laptop running macports.
In the last few month (years?) it seems to have stopped being operational and after spending many hours in trying to get it to work again i wonder wether the root problem is much more severe after i saw that https://dev.gnupg.org/T3717 I ... |
For the time being my work around is to use a unix machine instead.
So first 1 transferred the key to my unix box:
gpg --export-secret-key 35...DEF | ssh server gpg --batch --import
gpg: key D38 ... not changed
gpg: key D38 ...: secret key imported
gpg: Total number processed: 1
gpg: unchanged: 1
gpg: ... | Is there a way to get gpg/gpg2 work with macOS macports in 2021? |
1,497,996,244,000 |
I'd like to use mutt to send and sign the email directly from command line like e.g.
mutt -s "MySubject" [email protected] < message OR echo " " | mutt -s "MySubject" -a message.txt -- [email protected]
but even I made a proper setup in muttrc and it actually works when I compose the email in mutt UI (agent interfac... |
Kevin J. McCarthy responded to a related question on the mutt user mailing list saying:
Sorry, cryptographic operations are disabled in batch mode.
Source: http://lists.mutt.org/pipermail/mutt-users/Week-of-Mon-20210412/002737.html
| signing email with PGP key outside Mutt UI interface |
1,497,996,244,000 |
I am learning how to use gpg, and I would like create multiple keys for different purposes, for example one to encrypting my emails, anther for connecting to ssh, yet another for pass password store. I can see this quickly getting out of hands where I loose track of which key did I use for ssh etc.
So my question is h... |
GPG (sub)keys used for SSH authentication must have usage A (Authentication) and in practice that usage isn't used for anything else, so selectively setting that could be enough to identify your SSH key(s). In older versions it was hard to set/change or even see the usage flags, but modern GPG it is better: see
How ar... | Give keys/subkeys in gpg names |
1,497,996,244,000 |
I have an application, run as a service by a system user, which uses GPG (using libgpgme in C). This user has no home directory and I would like to eliminate password caching.
Therefore I'd like gpg-agent to be started with --homedir=/opt/myapp/.gnupg --default-cache-ttl 0.
gpg-agent(1) says:
The agent is automatica... |
How should one start gpg-agent for a specific home-dir with specific command-line options?
In the service file use Environment=GNUPGHOME=/opt/myapp/.gnupg. gpg-agent is started automatically when calling gpg (or using necessary functions in libgpgme). By setting $GNUPGHOME, the gpg/gpgme calls will connect to an e... | Starting gpg-agent with specific options |
1,497,996,244,000 |
I am trying to install latest R package on Debian Stable (Buster) following instructions on this page: https://cloud.r-project.org/
I added following to /etc/apt/sources.list:
deb https://cran.csiro.au/bin/linux/debian buster-cran35/
However, when I run sudo apt-get update, I get following error:
$ sudo apt-get upd... |
You need to import the archive key, using the id given in the error message (assuming you trust the repository):
apt-key adv --keyserver keys.gnupg.net --recv-key FCAE2A0E115C3D8A
| Not able to install latest R statistical package in Debian Stable |
1,497,996,244,000 |
When I run gpg2, I'm prompted for a password every time I use it.
Based on my reading of the gpg-agent man pages, I should only be
prompted the first time.
gpg-agent is a daemon to manage secret (private)
keys independently from any proto-col. It is
used as a backend for gpg and gpgsm as well as
for a couple of ot... |
From the GnuPG 2.2.4 manual, regarding --export-secret-keys (specifically):
GnuPG may ask you to enter the passphrase for the key. This is
required, because the internal protection method of the secret
key is different from the one specified by the OpenPGP protocol.
| gpg-agent is running, but I'm always prompted for password |
1,497,996,244,000 |
I'm currently doing a high school project by studying RSA keys for
better understanding them theoretically and practically. A part of the
project consist of an experiment, and I choose to test and see how big
the workload will be for the CPU when generating RSA keys of different
length. I would also like to save the t... |
GnuPG reads from /dev/random, which blocks when not enough entropy is available (which is a debatable behavior). The actual computational effort is rather negligible. You might also observe that the first run/few runs terminate faster, as the entropy pool was still filled with "fresh bits". I recommend running watch c... | Questions regarding generating RSA keys with GnuPG |
1,497,996,244,000 |
Problem
I wish encrypt an email to [email protected], using mutt. I have an associated key, which I trust marginally. After attempting to send the email, I have to select from a list of keys, both of which appear identical.
-> 1 ? 4096/0x123456789ABCDE01 RSA es
2 ? 4096/0x123456789ABCDE01 RSA es Foo <[ema... |
It looks like Dale Woolridge's confirm-crypt-hook patch has been merged into mutt.
use crypt-hook rather than pgp-hook.
crypt-hook [email protected] 0x123456789ABCDE01
set crypt_confirmhook=no for that recipient. e.g.
send-hook ~t [email protected] 'set crypt_confirmhook=no'
This should work with mutt or neomutt.... | How can I get mutt to automatically select pgp keys? |
1,497,996,244,000 |
When running.
sudo apt-get update
For example something like this could happen.
W: GPG error: http://deb.torproject.org wheezy Release: The following signatures were invalid: KEYEXPIRED 1409325681 KEYEXPIRED 1409325681 KEYEXPIRED 1409325681 KEYEXPIRED 1409325681
(This question is not about this particular example wa... |
Make a wrapper script around /usr/bin/gpgv. Supply the pathname to the wrapper script as the value of Dir::Bin::gpg (using apt-get --option). Have the wrapper script examine the output and exit status of gpgv, and communicate failure back to the toplevel script somehow (I suggest using kill to send a signal).
| apt-get update: How to check for GPG errors when using scripts? |
1,497,996,244,000 |
I'm running Ubuntu (via Regolith) and my gpg key is unlocked when I log in. I'm running multiple decrypt operations in parallel and I noticed, that if I get above 7, gpg-agent will "forget" that the key is already unlocked and I get prompted for a pinentry.
❯ gpg --version
gpg (GnuPG) 2.2.27
libgcrypt 1.10.1
I made a... |
After careful monitoring of journalctl I found that the actual error was Cannot allocate memory. Based on this discussion, gpg-agent can run out of secure memory if multiple thread are trying to access it. Setting auto-expand-secmem 100 in ~/.gnupg/gpg-agent.conf resolves the issue.
--auto-expand-secmem n ... | gpg-agent "forgetting" password for key, when getting too many requests |
1,536,161,877,000 |
Adding to this question:
How do I close gnupg V2.0 smartcard after signing an rpm?
I tried to execute:
gpg-agent --default-cache-ttl 15 --max-cache-ttl 15 --daemon
But after 15 seconds, if I execute again a signature, gpg2 doesn't prompt for the PIN.
The only solution I've found so far, is to unplug/plug smartcard on... |
Starting gpg-agent with those parameters probably gives you a message:
gpg-agent: gpg-agent running and available
You are not changing that running session, and that is what caches your PIN.
That session is (at least on my Ubuntu 12.04 system) started by the gnome-session, effectively by the script /etc/X11/Xsession.... | How close smartcard after sign rpm with GPG2? |
1,536,161,877,000 |
I'm using Gnome Keyring with GPG. Whenever I need to sign something, the keyring daemon takes over and does it for me.
However, if I do: export GNUPGHOME=/path/to/keyring from a Bash script and use gpg in that script, the keyring daemon doesn't take over.
Why is this? How can I change this, so that the keyring is used... |
Solved it!
The problem was that the option use-agent wasnt enabled.
I had previously uncommented use-agent in ~/.gnupg/gpg.conf to be able to use the keyagent for my default keyring.
BUT, since I changed the homedir of the keyring, gpg was looking for a config in /path/to/keyring/gpg.conf instead and found nothing, si... | Use non-default keyring with gnome-keyring |
1,536,161,877,000 |
I am using the instructions linked below to setup apt to install sublime-text.
I am intentionally applying the method for connecting to third party repositories described on the Debian and Stackexchange pages, using Sublime as an example of a third party repo.
https://www.sublimetext.com/docs/linux_repositories.html
h... |
I assumed that all processes reading the public key file would have root access. But it turns out likely not to be the case.
Because setting the permissions to 0640 caused the issues I reported, and setting them to 0644 instead resolved the problems.
The updated command should look as follows:
sudo chmod -v 0644 /usr/... | Installing Sublime Text with apt fails due to missing public key |
1,536,161,877,000 |
I've lost my key. Now I can't sign anything, and servers don't accept unsigned content. The key is uploaded to a keyserver. Now I have fingerprint, public key and I remember my passphrase.
How can I re-generate same key on my Linux box?
|
You cannot generate the private key¹ from the public key and the passphrase. The private key does not depend on the passphrase in any way. The passphrase is only used to encrypt the private key when you store it in a file. You could have multiple copies of the same private key encrypted with different passphrases. And... | Generate GPG secret key from public key and passphrase |
1,536,161,877,000 |
I've used gpg2 to generate some keys on my Ubuntu 16.04 server. Now I have to move the machine. I need to transfer all generated keys to a Mac. I think I just have to copy the ~/.gnupg files.
But where do I have to store it to get them called via gpg --list-secret-keys --keyid-format LONG [email protected]? Same place... |
On the machine that initially has the keys (the Ubuntu machine):
Export the public keys:
gpg --export --armor --output=key_public.asc
Export the private keys:
gpg --export-secret-keys --armor --output=key_secret.asc
Copy the exported files to the second machine (the Mac).
Import the keys:
gpg --import --armor key_pu... | How to move my GnuPG home directory from Ubuntu to Mac? |
1,536,161,877,000 |
I have a weird ask.
I have a tar achive, archive.tar.gz, filled with plaintext files. That archive is then gpg encrypted into archive.tgz.gpg. In total, archive.tgz.gpg is < 100KB.
Now, I want to make archive.tgz.gpg look like a linux binary, and have it be un-obfuscated using mostly unix standard utilities. I'm aware... |
You can totally embed the payload into a working executable.
echo "I am your encrypted message." > message.txt
gpg2 --symmetric message.txt
ld -r -b binary -o message.o message.txt.gpg
gcc -o unsuspicious unsuspicious.c message.o
With unsuspicious.c containing any program:
#include <stdio.h>
int main(int argc, char**... | Make GPG encrypted file look like binary executable |
1,536,161,877,000 |
I know that I can create a GPG keypair from the CentOS 7 terminal by typing gpg --gen-key and following the resulting steps, but how can I make sure that the resulting public key is self-signed? And how can I send the resulting key via email to a remote computer?
I know that I can send an email with an attachment us... |
First, find the public key you want to export:
gpg --list-public-keys
Look at the line marked 'pub'; it displays your public key type and number. For instance:
pub 1024D/5000280F 2009-07-10
Use the number to do your export:
gpg --armor --export 5000280F > klaatu_pubkey.asc
Check to make sure it worked:
cat kla... | creating and sending a self-signed public key using GnuPG in CentOS 7 |
1,536,161,877,000 |
I have encrypted a file through gpg ***.gpg --encrypt --recipient [email protected] ***
The hard disk with my Linux system where such file was encrypted has dead. I keep just the ***.gpg file in an external hard drive.
When I try in my new Linux system gpg --output *** --decrypt ***.gpg I get
gpg: encrypted with RSA k... |
gpg needs a private key to decypher your file. If you have none (because your disk is wiped), you won't be able to decipher it. In a sense, it is hopefully because on an other way other people would be able to decipher it too.
Then when using gpg, your ~/.gnupg directory should be backuped with as many precaution as t... | Solving gpg: decryption failed: No secret key |
1,536,161,877,000 |
Following these instructions, I downloaded and unpacked the kernel.
https://priyachalakkal.wordpress.com/2013/01/19/verifying-digital-signature-using-gpg/
Then I tried to verify the signature but I get an unexpected error. That isn't one of the success or failure scenarios described by sites that document the basic ap... |
You don’t have the right key; the 5.6.9 archive is signed by Greg Kroah-Hartman, not Linus. Running
gpg --recv-keys 647F28654894E3BD457199BE38DBBDC86092693E
will allow you to verify the archive. (This is the fingerprint from your second gpg invocation.)
The message you get after retrieving the key indicates two thing... | Trouble verifying linux, even after downloading key I get "No public key" |
1,536,161,877,000 |
I would like to speed up my archiving operations, I am usually doing 23 GiB (one Blu-Ray) backups.
I have found this: How to do large file parallel encryption using GnuPG and GNU parallel?
Since I don't understand this code at all (have never used parallel):
tar --create --format=posix --preserve-permissions --same-o... |
tar run command tar.
--create create a tar archive.
--format=posix use the POSIX format of tar archive. This means you can extract it on other systems that support the POSIX format.
--preserve-permissions keep the same permissions on the files
--same-owner keep the same owner of the file (only relevant when extracting... | GNU parallel proper usage in conjunction with tar, xz, gpg |
1,536,161,877,000 |
From what I understand it is considered to be good practice to generate a private-public keypair, generate a subkey for encrypting, export all three keys and store/backup them (e.g. using 'paperkey') and then only re-import the public key and the subkey (see https://paul.fawkesley.com/gpg-for-humans-protecting-your-pr... |
To change the expiration date, I would suggest to use
gpg --quick-set-expire FINGERPRINT \*
which is easier to script.
See the man page (here or here) for details.
For deleting just the primary secret key you can use a regular command;
for example:
$ gpg --delete-secret-key 502D1A5365D1C0CAA69945390BA52DF0BAA59D9C\... | Delete only private signing key from within gpg (without reimporting subkeys or 'rm ~/.gnupg/private-keys-v1.d/KEYGRIP.key') |
1,536,161,877,000 |
I often use gpg command to encrypt files like so
gpg -c file
which produces a file.gpg. I would like to get rid of the command line aspect and have a right click button in my Nautilus. I tried installing the Seahorse extension for Nautilus but it doesn't work very well and I would like to keep the simplicity of my ab... |
As far as I know there are two simple ways to add entries to the Nautilus context menu :
Nautilus scripts
nautilus-actions package, which, depending on your distribution might be depreciated.
I'm running on Debian Bullseye/sid where nautilus-actions is not available so I will present the way using Nautilus script. T... | GPG encryption in Nautilus right click menu |
1,536,161,877,000 |
I am unable to install gpg with pip:
# pip install gpg
Collecting gpg
Downloading
Complete output from command python setup.py egg_info:
Could not find gpgme-config. Please install the libgpgme development package.
----------------------------------------
Command "python setup.py egg_info" failed with error code ... |
Since you need gpgme-config, you’ll need to install libgpgme-dev, which is the development package for libgpgme:
apt install libgpgme-dev
You could also skip using pip entirely and install the python-gpg (or python3-gpg if you’re using Python 3) package instead:
apt install python-gpg
| Cannot install python gpg on Kali |
1,536,161,877,000 |
I encrypted it with the command
gpg2 -c --passphrase thePassword --batch --no-tty <file >file.gpg2
How can I decrypt it, knowing the password?
|
I've just tested and it works.
On first virtual machine:
[yurij@centos7 gpg]$ cat test2.c
Another test.
Really?
OK.
[yurij@centos7 gpg]$ gpg2 -c --passphrase password --batch --no-tty < test2.c >test2.c.gpg2
[yurij@centos7 gpg]$ cat test2.c.gpg2
�c�a����0Li�p��t���JL��(
�ޢ� Xt��Z�f��(s�XU�K(ؖ��... | How to decrypt symmetrically encoded gpg2 files? |
1,536,161,877,000 |
Using a Debian9 server, behind a proxy, I need to install a docker client.
So to get a key I use the commands:
apt-key adv --keyserver http://WHATEVERKEYSERVERITRY --keyserver-options http-proxy="http://proxy.myclientdomain:4128" --recv-keys 7EA0A9C3F273FCD8
Executing: tmpapt-key-gpghome.BO0J96KdNM/gpg.1.sh --keyserv... |
If all else fails, you can use
curl "https://pgp.surfnet.nl/pks/lookup?op=get&search=0x7EA0A9C3F273FCD8"
and extract the public key block from the output, for example
curl "https://pgp.surfnet.nl/pks/lookup?op=get&search=0x7EA0A9C3F273FCD8" |
awk '/^-----BEGIN/ { output = 1 }; output; /^-----END/ { output = 0 }'
| apt key management failure any full online solution or key download method |
1,536,161,877,000 |
I'm now using Debian for developing a C++ application with GPGME. Currently I read that a new version of GnuPG (2.1.10) is available which supports ECC. I would really like to use this feature in my application. But as I checked the currently installed version in my system I noticed that I only have GnuPG 1.4.18 avail... |
GnuPG Branches
There are different release branches of GnuPG, modern, stable and classic.
Three different versions of GnuPG are actively maintained:
GnuPG "modern" (2.1) is the latest development with a lot of new features. This announcement is about the first release of this version.
GnuPG "stable" (2.0) is the cu... | How to replace GnuPG stable with GnuPG modern? |
1,536,161,877,000 |
On OpenBSD, how/with what I can create an encrypted container that can later be dynamically expanded? Can I do it with GPG? (password protection is enough)
So, if I open this container and put files in it, it would dynamically expand as more files are put in it.
Please do not recommend a Linux solution (e.g. TrueCryp... |
The official encrypted container on OpenBSD is through vnode pseudo devices, set up with vnconfig. As far as I know, these cannot be resized: you'd have to create another, larger container and copy the data.
Encfs is a FUSE flesystem that performs encryption file by file (so there is no container size issue). There is... | How to create an encrypted container (dynamically expandable) on OpenBSD |
1,536,161,877,000 |
First, I have done literally hours of work and research on this... attempting to find a solution my self. But I am unable to either understand what I am missing or get all the info I need (not sure which). Second, this is the first time I have ever dealt with GPG. Lastly, I am aware just how old the version of Zabbix ... |
I tried your suggestion Stephen. Unfortunately, that resulted in the same error.
I asked someone I know about this... He pointed out that the GPG key that I am getting is expired... I believe that may be the actual cause. I was confused by the wording of the error "the public key is not available". This led me to beli... | add repo to debian (gpg issue) |
1,536,161,877,000 |
I can decrypt file on one machine, but on another one it says "can't check signature" (but still decrypts file).
$ sudo gpg --lock-never -o update.tar -r [email protected] --decrypt myfile.sig
gpg: Signature made <DATETIME>
gpg: using RSA key <KEY>
gpg: Can't check signature: No public key
How can I fi... |
You may need to reimport/export your keys and import them:
run this in a file, make sure you run chmod +x file first.
#!/bin/bash
your_id_here="$@"
#your_id_here is your ID.:
#Export keys and ownertrust:
exportkey() {
gpg --export --armor $your_id_here > $your_id_here.pub.asc
gpg --export-secret-keys --armor $your_id... | gpg: Can't check signature: No public key |
1,536,161,877,000 |
Every day when I have a scheduled backup running, I see this error:
Error processing remote manifest (duplicity-inc.20190724T191929Z.to.20190726T191408Z.manifest.gpg): GPG Failed, see log below:
===== Begin GnuPG log =====
gpg: WARNING: "--no-use-agent" is an obsolete option - it has no effect
gpg: AES encrypted data... |
just remembered. most likely a gpg upgrade issue, see
https://askubuntu.com/questions/1057627/duplicity-fails-with-bad-session-key-error
quoting from linked workaround in the above ticket
"
The problem is, like the linked post stated, that gpg 2.1 retires passphrase from pipe for key auth.
The gpg agents needs to be e... | How can I fix this gpg error with Backup (deja-dup, duplicity)? |
1,536,161,877,000 |
I encrypted a text file in terminal using "gpg -c filename" and got "filename.txt.gpg" created in my file manager. I deleted the original unencrypted file.
Now I want to decrypt it in Nano so I can continue working on it. If, in a terminal, I do "gpg -d filename.txt.gpg", the file opens in terminal where I can read i... |
gpg -d just prints the file to standard output, but you can redirect the output to a file instead: gpg -d filename.txt.gpg > filename.txt. Or use the -o outputfilename option. Also, you can just run gpg filename.txt.gpg, which cause gpg to guess what you want, and in that case it decrypts the file to filename.txt (dro... | How decrypt a file in nano text editor? |
1,536,161,877,000 |
System: Linux Mint 19 Cinnamon, based on Ubuntu 18.04.
In this answer, I am being pointed at a different solution, other than installing directly from source.
Since I haven't ever used dget, I must have it installed first with:
$ sudo apt-get install devscripts
Upon the first suggested line:
$ dget -x http://deb.de... |
I am unsure if this is the right solution to my problem, but since it resolved the warning, I will add it here:
sudo apt-get install debian-keyring
As pointed out by Stephen Kitt, there is another possibility to disable verification with:
dget -x -u ...
but the above approach is better from the security standpoint.... | dpkg-source: warning: failed to verify signature |
1,536,161,877,000 |
I was was using gpg --gen-key till I got to enter the passphrase where I get:
┌──────────────────────────────────────────────────────┐
│ Please enter Passphrase, │
│ │
│ Passphrase: ________________________________________ │
│ ... |
With the cursor in the PIN entry area, pressing Enter will activate the “OK” button.
Pressing Tab will highlight the “OK” button and then the “Cancel” button; pressing Enter with a button hightlighted will activate that button.
| how to navigate with pinentry |
1,536,161,877,000 |
I don't want to use the standard gpg version in raspbian which is almost 4 years old . I had to compile all the libraries manually . This worked fine but then when I compiled gpg it saied " libgcrypt too old need 1.7.0 have 1.6.4 " even tho I install libgcrypt 1.8.1 . So i uninstalled gpg and libgcrypt with " make uni... |
Converting comment to answer:
From your comments, you are using the oldstable version of Raspbian. You should be aware that the oldstable receives less frequent updates and is estimated to remain within the Debian security team's perview for about one year after the release of the next stable release.
See Debian's wi... | I have trouble installing gnupg on raspberry pi |
1,536,161,877,000 |
How do I make a signed RPM package for my binary?
I need to distribute my binary as a signed RPM package on RHEL 4 using GPG.
It's for distribution of my binary with YUM ( http://yum.baseurl.org ).
|
I've used these steps in the past to sign my RPMs. It's pretty much derived from this tutorial, titled: Signing RPMs with your own key.
generate a key
$ gpg --gen-key
gpg (GnuPG) 1.4.5; Copyright (C) 2006 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are ... | How to create and sign a RPM-package with RedHat 4, that works with YUM? |
1,536,161,877,000 |
I was preparing my Kali Linux to run a Tor's Middle Relay. I was doing Tor Project's Repository configuration according to this site.
I made steps 1 and 2. The 3rd step was to add the gpg key used to sign the packages by running the following command:
sudo wget -qO- https://deb.torproject.org/torproject.org/A3C4F0F979... |
First, let's break down what's happening. sudo is only being used to run wget, not the rest of the command. What you did is functionally equivalent to:
# 1. Download a file and save as 'file.asc'
sudo wget -qO- https://d...E886DDD89.asc > file.asc
# 2. Dearmor that file (generates file.asc.gpg)
gpg --dearmor file.a... | Add the gpg key used to sign the packages by running the following wget | gpg | tee >/dev/null command |
1,654,863,431,000 |
I have a Sipeed Lichee RV that runs a Debian image, but I cannot install software due to missing key.
I have followed the Package Authentication Instructions but am getting this error:
root@sipeed:/etc/apt# gpg --keyserver hkps://keys.openpgp.org --recv-keys 0xE852514F5DF312F6
gpg: key E852514F5DF312F6: new key but co... |
If you can't import the gpg key, you can install the debian-ports-archive-keyring manually.
wget http://ftp.us.debian.org/debian/pool/main/d/debian-ports-archive-keyring/debian-ports-archive-keyring_2022.02.15_all.deb
sudo dpkg -i debian-ports-archive-keyring_2022.02.15_all.deb
Or use:
wget -O - https://www.ports.de... | Setting up debian archive keys on risc64: new key but contains no user ID |
1,654,863,431,000 |
SHORT
GPG doesn't get signatures of an imported public key anymore (with Ubuntu 20.04) while it did it 6 months ago (with Ubuntu 18.04).
I don't understand what's wrong.
LONG
On march, I followed this mini HOW-TO in order to verify an Ubuntu ISO.
And when I imported the public key which signed the checksum file to ver... |
Sadly, it's the usual reason why whe can't have nice things: someone found out how to abuse the GPG ecosystem, and then did exactly that.
The SKS keyserver network has had known vulnerabilities for several years, and in mid-2019 someone finally started exploiting those vulnerabilities in significant volume, resubmitti... | GPG : no more signatures of a fresh imported key |
1,654,863,431,000 |
Information:
GPG version: 2.2.23
Docker version 20.10.5
I am playing around with GPG on my laptop and trying to reuse it inside docker container.
The docker container is simply a PHP-FPM alpine image. I have simple PHP CLI tool which encrypt/decrypts data with GPG. I exported the GPG from host and imported it inside ... |
I would say the resolution was very simple.
GPG
First of all, you need to start gpg-agent:
gpg-agent --verbose --daemon --log-file /tmp/gpg-agent.log --allow-preset-passphrase --default-cache-ttl=31536000
This will start gpg-agent in background. You can verify that it is running:
ps aux | grep gpg
Now you need to us... | How to forward gpg-agent from host to docker container and reuse cached passphrase? |
1,654,863,431,000 |
I have:
A file
A detached PGP signature of that file in ASCII armor format and
A 40-character (long-format) fingerprint identifying the one key that must have a valid signature
What is the correct way to write a BASH script to verify that the given signature is valid (only for the given fingerprint) for the given fi... |
Use gpgv:
gpgv --homedir "${tmpDir}/gnupg" --keyring "${tmpDir}/gnupg/pubring.kbx" python_gnupg-0.4.6-py2.py3-none-any.whl.asc python_gnupg-0.4.6-py2.py3-none-any.whl
It will only indicate success (exit code 0) if all signatures are verified using keys in the given keyring.
If you want to check that the key you impor... | Correct way to verify PGP signature in BASH script (pinning exact long fingerprint) |
1,654,863,431,000 |
Recent versions of gpg launch a persistent user process (gpg-agent) when generating keys. This process remains running even after the command terminates. I want to change this behavior.
Currently, I'm using unshare and PID namespaces to isolate and kill off anything that gpg leaves running. Unfortunately, this approac... |
One possibility is to stop the agent once you no longer need it:
gpgconf --kill gpg-agent
Since you’re using a custom home directory, you need to set GNUPGHOME or specify --homedir:
GNUPGHOME=/tmp/TEMP_DIR gpgconf --kill gpg-agent
If you want to stop all GnuPG-related processes, specify all instead of gpg-agent.
| How can I generate gpg keys in scripts without leaving gpg-agent running? |
1,654,863,431,000 |
I've deleted some keys from /etc/apt/trusted.gpg and trusted.gpg.d. Then i use apt update and get this message:
An error occurred during the signature verification. The repository is not updated and the previous index files will be used. The following signatures were invalid: NO_PUBKEY 4C6E74D6C0A35108
It seems like... |
The previous index files are stored in /var/lib/apt/lists. They’re the last index files which apt successfully downloaded and verified.
The key is determined by looking at the Release signature, which isn’t in the Release file itself but in Release.gpg alongside it. Some repositories have an InRelease file which has t... | Old index files of repositories |
1,654,863,431,000 |
I have created a binary deb package with dpkg-deb command. It is installable and works.
> dpkg-deb --build /test
dpkg-deb: building package `xxx' in `test.deb'.
Now I want to sign the package, but debsigs failed with errors:
> debsigs --sign=maint -k XXX /test.deb
no entry data.tar.gz in archive
Was it a problem wi... |
Your version of dpkg-deb produced a .deb package containing an xz-compressed data.tar, but your version of debsigs doesn’t support that, it only supports gzip-compressed data.tar components. To solve this, there are two possible approaches:
upgrade debsigs to 0.1.18 or later (which is widely available, albeit not in ... | debsign: no entry data.tar.gz in archive error |
1,654,863,431,000 |
I have found a strange error. It is OK when I commit using gpg with git under bash or zsh.
git commit -S -m "xxx"
However when I commit it under tmux, I got:
gpg: signing failed: Operation cancelled
gpg: signing failed: Operation cancelled
error: gpg failed to sign the data
fatal: failed to write commit object
|
You need to ensure that your GPG_TTY variable is correct; add
GPG_TTY=$(tty)
export GPG_TTY
to your shell startup scripts, including for non-login shells (your login shells are probably OK, but not non-login shells, which is why this fails in tmux).
| gpg: signing failed: Operation cancelled under tmux? |
1,654,863,431,000 |
Earlier on today I decided to backup my laptop and re-install everything. I thought I backed up the GPG keys correctly but it turns out I only exported my public key.
I understand that I can't get that key back as I failed to back it up correctly.
My question though is, can I re-generate a new secret key and assign i... |
Your old private key is gone so about all your old public key is good for is 'legacy' usage. (i.e. you won't be doing anything new with it but it could be used to verify anything previously signed, for example) Going forward, everything would be based on your new private/public key pair which have no relation to your ... | GPG Lost Secret Key |
1,654,863,431,000 |
Given a detached signature mydoc.sig of a document mydoc produced with
gpg --local-user <GPG_RECIPIENT> --detach-sig mydoc
How can I create a printable output of this signature in base16 (as when exporting a private key with paperkey)?
The ASCII armor signature is a convenient output to be printed,
Obviously the fol... |
od -t x1 mydoc.sig
produces similar output that should be just as usable.
As you presumably know since you mention it in your question, you can also create an ASCII-armored signature using
gpg --detach-sig -a mydoc
I don’t know whether you’d consider that good enough for printing as-is though. There’s not much point... | How to produce a printable PGP detached signature (eventually in base16)? |
1,654,863,431,000 |
I want decrypt some gpg files, output into a file. But each time gpg ask password.
for i in *.gpg; do echo $i>>~/t; gpg -d --batch $i >>~/t; done
I test --multifile and --batch, those not as my wish.
|
Several ways:
# gather the password into $P
stty -echo; read -r P; stty echo;
for i in *.gpg; do printf '%s\n' "$i" >> ~/t; printf '%s' | gpg -d --batch --passphrase-fd 0 "$i" >> ~/t; done
# gather the password into $P
stty -echo; read -r P; stty echo;
for i in *.gpg; do printf '%s\n' "$i" >> ~/t; gpg -d --batch --... | How can I input password only once when gpg decrypt files in batch |
1,654,863,431,000 |
I want to generate a GPG key interactively in expert mode.
gpg --expert --gen-key
I only have the name, email and a prompt for a passphrase, no key size, key type, etc., why would it be so?
|
I guess this is version dependent. Try --full-gen-key instead of --gen-key. You can also try gpg2 instead of gpg.
| Why are gpg key options not displayed when generating a key? |
1,654,863,431,000 |
Using the --keyring option, I'm unable to export public keys with gpg:
$ gpg -vv --armor --keyring pubring.gpg --export
gpg: writing to stdout
gpg: WARNING: nothing exported
Yet it works with --homedir:
$ gpg --armor --homedir . --export
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.14 (GNU/Linux)
...
Wh... |
From the gpg man page:
--keyring file
Add file to the current list of keyrings. If file begins
with a tilde and a slash, these are replaced by the $HOME
directory. If the filename does not contain a slash, it is
assumed to be in the GnuPG home direc... | Unable to export public keys with gpg using --keyring |
1,654,863,431,000 |
I am trying to setup my Nitrokey (GPG usb Smartcard). I got it to work by adding reader-port into the scdaemon config file. I had to do this because my laptop has multiple built in smartcard readers. It seems to work if the Nitrokey is plugged in at boot. If it isn't I need to restart pcscd manually.
It seems that ev... |
I admit it's more a work-around than a clean solution but you can use a udev rule for restarting pcscd.
I have a similar problem with scdaemon. I use udev to restart scdaemon on plugging in a smartcard reader by adding this to the udev rule:
RUN+="/usr/bin/killall -9 scdaemon"
| scdaemon/gpg doesn't work |
1,654,863,431,000 |
What is the binary export / import format used bygpg for public and private keys?
|
The format is defined in RfC 4880 (e.g. section 5.5 Key Material Packet).
| Export format of gpg [closed] |
1,654,863,431,000 |
The commands gpg --export and gpg --export-secret-keys can be used to export keys in a binary format.
Is there any command available to examine these exported binary key files? I need to see if the exported files contain some extra fields or any other incompatibility problems.
|
gpg --list-packets keyfile.gpg
Even possible as
gpg --export 0x12345678 | gpg --list-packets
gpg --export-secret-keys 0x12345678 | gpg --list-packets
| Examine exported binary gpg key |
1,654,863,431,000 |
I've written a little script for my Clonezilla USB stick which will allow me to quickly back everything up without entering any options by simply running the script.
Next, I'd like to store my public GPG key on the stick and add some encryption to my backups like so:
find . -maxdepth 1 -type f -not -iname "*.gpg" | wh... |
You must have the target key in the keyring. I am not sure whether it is necessary that the target key is valid; better make it so.
You should use a config directory on the stick. With this directory being empty you import the key:
gpg --homedir /dir/on/stick --import /target/key.asc
This needs to be done just once. ... | Batch encryption using a public GPG key |
1,654,863,431,000 |
The import command saves screenshot in a file. Is there a way to encrypt that file at the same time using gpg, without saving the image file first? gpg accepts input from stdin but it seems that import doesn't support writing files to stdout, so I can't pipe output of the import to gpg.
|
The import command on my system supports writing to stdout. Just use - as the filename. You'll probably want to prefix that with the image format you want, e.g.:
import png:- | gpg ...
| Encrypting import's output with gpg at the same time |
1,654,863,431,000 |
The GnuGPG passphrase prompt dialog box timesout after 60 seconds.
How do I increase the timeout period ?
(Just to clarify that I am not looking for default-cache-ttl but the timeout of the passphrase dialog box itself. I am using GnuPG v2.2.23 on Fedora 33).
|
You can increase timeout period of passphrase prompt dialogue box by adding the following line to $HOME/.gnupg/gpg-agent.conf[0]
pinentry-timeout 120
Now the passphrase popup will wait for 120 seconds. To load the above config restart gpg-agent by running[1]
gpgconf --kill gpg-agent
gpg-agent will be started automat... | How to increase GnuGPG passphrase dialog box timeout? |
1,654,863,431,000 |
I use GNU's password store (pass) to save all my passwords including my email passwords.
I have a passphrase set on my GPG keys which is then remembered by gpg-agent for an hour. I also have a cron job that pulls my emails at regular intervals which obtains the email passwords using pass.
What this means is that the c... |
You don't need to remove passphrases for all your keys. However, gpg-agent is not designed to have multiple settings for different keys. Therefore, I think your best bet is to create an additional password store associated with a different gpg key without a passphrase and use that for your cron jobs.
Basically, create... | Remembering gpg pass-phrase for certain processes |
1,654,863,431,000 |
I've tried all methods published in older questions, such as adding from ubuntu.keyserver, using gpg, from hkp://pool.sks-keyservers.net:80 etc, any ideas ¿?
gpg:
gpg --recv-keys 0E61D3BBAAEE37FE
gpg: recepción del servidor de claves fallida: No data
ubuntu keyserver:
Executing: /tmp/apt-key-gpghome.zPtWaE6tzD/gpg.1.... |
Your default server, and the Ubuntu keyserver, aren’t down; they just don’t have the key you’re asking for. 0E61D3BBAAEE37FE isn’t available from any keyserver I’m aware of.
| no public key on debian 11 unable to apt update |
1,654,863,431,000 |
I am currently trying to automate the encryption and decryption of a collection of files. For the encryption I currently use:
gpg --batch --recipient [RECIPIENT] --encrypt-files [FILES]
For the decryption I use pretty much the same:
gpg --batch --decrypt-files [FILES]
But both during encryption as well as decryption... |
As @a-b and @frostschutz suggested, wrapping the files in a tar file and then encrypting is an option.
However, I would like to have access to the original file structure without decrypting. For now, I have resorted to aligning the file permissions after the batch decryption. This has the additional benefit of alignin... | How do I decrypt files with gpg / gnupg without loosing the original file permissions? |
1,654,863,431,000 |
I'm trying to verify the SHA512 checksum for Debian 10.5-amd-netinst.iso as found on the official Debian CD-image site.
I'm running into the following error:
gpg --no-default-keyring --keyring Debian\ CD\ signing\ key\ \(6294BE9B\)\ –\ Public.asc --verify SHA512SUMS.sign
gpg: assuming signed data in 'SHA512SUMS'
gpg: ... |
The GnuPG --keyring argument doesn't accept an ASCII-armored file as input. The easiest way to verify this is to do this:
$ gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys DF9B9C49EAA9298432589D76DA87E80D6294BE9B
$ gpg --no-armor -o keyring.gpg --export DF9B9C49EAA9298432589D76DA87E80D6294BE9B
$ gpg --no-de... | Verifying Signature of Debian 10.5 returns error "Can't check signature: No public key" |
1,654,863,431,000 |
System: Linux Mint 19 Cinnamon, based on Ubuntu 18.04.
Upon my limited knowledge of gpg, which version I will state here for future references:
gpg (GnuPG) 2.2.4
libgcrypt 1.8.1
I thought the following command does not need anything special specified:
$ gpg --recv-keys 402543B2D98854007F627D36A63A58A3F2E17569
But I... |
Cause
This error may happen when one is not connected to IPv6 network.
Source
I have just installed GnuPG on my FreeBSD, and it kindly informed me, quoting:
GnuPG, when run on hosts without IPv6 connectivity, may fail to connect to dual-stack hkp servers.
Workaround on FreeBSD
Add this line:
disable-ipv6
to the f... | gpg: keyserver receive failed: Address family not supported by protocol |
1,654,863,431,000 |
I am running Devuan Jessie. I want to install another Devuan Ascii from scratch. So I downloaded:
https://files.devuan.org/devuan_ascii/installer-iso/devuan_ascii_2.0.0_amd64_netinst.iso
https://files.devuan.org/devuan_ascii/installer-iso/SHA256SUMS
https://files.devuan.org/devuan_ascii/installer-iso/SHA256SUMS.asc... |
Unfortunately, there doesn’t appear to be a better way to authenticate the images:
all the files involved are downloaded over the same channel;
the key used to sign the SHA256SUMS file isn’t available in the previous Devuan release;
the key, as provided in the keyring, isn’t signed by any other key;
the key, as publi... | How do I verify https://files.devuan.org/devuan-devs.gpg |
1,654,863,431,000 |
I've been using the Déjà Dup backup tool with Linux Mint for a while now and just decided to investigate whether it actually works (short of trying to restore, as I only have one machine and don't want to break it!).
In snooping around, I have two questions that I was hoping someone might be able to shed light on:
It... |
I am far from an expert on on this backup tool although I have been using it for about a month now on a new Linux Mint system. First of all, you need to understand that Deja Dup is simply a graphical front end for the tool that actually does the backup - duplicity. Duplicity works by scanning what you have defined t... | Déjà Dup .gpg backup files are significantly less than backed-up material, how to be certain it's working? |
1,487,911,853,000 |
I am looking for a bash script which input is the old and the new password for changing password of a *.gpg file.
I encrypted a txt file with command gpg -c. System create a file.txt.gpg. How can I change the passphrase that I created before?
|
You cannot change the passphrase, but you can decrypt and reencrypt:
gpg --decrypt file.txt.gpg | (gpg -c > tmp.gpg && mv tmp.gpg file.txt.gpg)
You shouldn't directly redirect to your encrypted file (it still needs to be decrypted) and the && make sure the mv is not executed unless the encryption succeeded.
The above... | CentOS - change the password of GPG file by bash script |
1,487,911,853,000 |
I'm a Debian user. I just created my own GPG public key. I'm just wondering if I re-install Linux on my system, is it possible to use the original GPG key or do I have to create a new one?
NOTE: If you know any good example sites for using the GPG key, it would be very helpful.
|
Delete the file ~/.gnupg/random_seed. Then make a backup of the whole directory ~/.gnupg/. Copy it back after reinstalling the OS.
Take care to securely erase the files on the backup storage if other people might get access to it (e.g. if it's a USB stick).
Usually /home is put on a separate volume so that the user da... | Can I use my original GPG key even though I've re-installed Linux? |
1,487,911,853,000 |
I'm trying to make mutt use a specific GPG key when sending mails to a specific recipient, much like "per-recipient rules" in OpenPGP / Enigmail. For example, if I want to send an email to [email protected] I want to encrypt it with the public key 0xDEADBEEF and when I send an email to [email protected] I want to encr... |
crypt-hook's pattern is a recipient, so remove ~t from the pattern, it's not needed:
crypt-hook '^coworker@company\.com$' '0xDEADBEEF'
| Set specific GPG key for specific recipient in mutt |
1,487,911,853,000 |
Installing a media player from rpmfusion (via yum) yields following output:
Transaction Summary
================================================================================
Install 3 Packages (+32 Dependent packages)
Total download size: 21 M
Installed size: 68 M
Is this ok [y/N]: y
Downloading Packages:
warning... |
You're not doing anything wrong. The package is incorrectly signed.
From a thread on lists.rpmfusion.org:
Are you aware of the other packages that would need to be re-signed,
too? a52dec is just one example.
Once the changed package arrives at the mirrors, installing it most
likely will work fine (requiring a "y... | What means warning: rpmts_HdrFromFdno when installing from rpmfusion? |
1,487,911,853,000 |
I used Dr Duh's yubikey setup about 20 days ago with no issue. I ran through it again last night on an M1 Mac with Brew and when we created the expiring authentication key, the keylist shows [AR] for the key where it would normally show just [A] for authentication. I have consulted the man pages on gnu.org and while ... |
I think these letters signify the capabilities. Reading https://github.com/gpg/gnupg/blob/master/doc/DETAILS#field-12---key-capabilities I think the R means "restricted encryption".
With regard to the case difference: "...in addition to these letters, the primary key has uppercase versions of the letters to denote the... | What is [AR] for gpg / gnupg authentication keys? |
1,499,090,140,000 |
After running the following command to revoke a key
gpg --gen-revoke <key ID>
I have to then press y, 2 times Enter followed by y
How would you suggest to answer automatically, that is revoking a key without any other user interaction than the passphrase prompt?
|
It appears to me that gpg opens the controlling terminal directly, so you're unable to redirect input.
| How to revoke a GPG key without confirmation? |
1,499,090,140,000 |
I have a unix machine with truecrypt 7.1a installed. I'm trying to mount a volume to test with the command line but I don't have the truecrypt command installed evidently. Did the command line functionality come with the install before the software went crazy or am I doing something crazy? Or is there a place to downl... |
So I found it out myself by scouring the web. You just use the path to the truecrypt executable in the app bundle:
/Applications/TrueCrypt.app/Contents/MacOS/TrueCrypt -h
The above command will get you the help option to see what other options there are for TrueCrypt. Also, here is one of the sources I found for the ... | How do I get the Truecrypt CLI installed? |
1,499,090,140,000 |
I'm looking to add a personal key for an apt repo to a netinstall disc which would require end users to not have to install it. I'm using simple-cdd to generate the build, so wrapping it into a .deb would be an option. But would copying the /etc/apt/trusted.gpg into a .deb be a bad idea? Would there be breakage? I'd l... |
I've found the answer in the form of preseeding the netinstall.
d-i apt-setup/local0/repository string http://repo.url/ dist main
d-i apt-setup/local0/source boolean true
d-i apt-setup/local0/key string http://key.url/
The above three preseed commands will respectively perform the following tasks: add the repository ... | Simple-cdd keyring addition |
1,499,090,140,000 |
I'm using duplicity on OS X Mavericks.
If I run my duplicity command, I get the following error:
===== Begin GnuPG log =====
gpg: conversion from `US-ASCII' to `utf-8' failed: Illegal byte sequence
gpg: “0DB243EE”: skipped: public key not found
gpg: [stdin]: encryption failed: public key not found
===== End GnuPG log ... |
I have found the solution. I always ran duplicity with the --encrypt-key=“XXXXXXXX” option. But for some reason I have to run it without "=" and the quotes. The correct syntax is: --encrypt-key XXXXXXXX.
| Duplicity and GPG: charset conversion |
1,499,090,140,000 |
I'd like to know if there are other tools like gpg to encrypt a file using AES encryption. I'd like the encryption to be a standardized format so I can use a programming language to decrypt the file on the other end. I am aware of zip file format but thought there might be more than this?
|
It may be impossible to do better than GPG's decades of secure tested encryption, but there are some other encryption tools available, ArchWiki has good info on them here https://wiki.archlinux.org/index.php/Disk_encryption
Though they focus on disk & folder encryption you could encrypt a folder at a time, or treat ... | Is there a common tool besides gpg for encrypting files in AES? |
1,499,090,140,000 |
My GPG installation got messed up, after trying to do some experiments as follows:
echo "trust" > "/proc/self/fdinfo/27"
echo "trust" > "/proc/self/fdinfo/26"
echo "trust" > "/proc/5639/fd/0"
echo "trust" > "/proc/5639/fd/1"
echo "trust" > "/proc/5639/fd/2"
echo -e -n "trust\n" > "/proc/5639/fd/2"
echo -e -n "trust\n"... |
It's not an error, everything is fine. It just doesn't have anything to do because you didn't specifiy e.g. --encrypt. I can reproduce it on my machine:
martin@martin ~ % LANG=C gpg
gpg: Go ahead and type your message ...
gpg: processing message failed: eof
Try instead:
gpg --encrypt --armor -r <your GPG email adress... | GPG installation got messed up, can't fix |
1,499,090,140,000 |
I run:
gpg --list-keys
I get:
pub rsa1024 2014-01-26 [C]
<REMOVED>
uid [ unknown] Totally Legit Signing Key <[email protected]>
Can this be dangerous? What is this? The address [email protected] is confusing.
|
The mallory keys were keys added to demonstrate that short key identifiers are easily spoofable. See this GnuPG discussion and this oss-sec post for details.
Unless you’re actively maintaining your OpenPGP web of trust, or validating OpenPGP signatures without checking the keys separately, you can ignore this.
| Totally Legit Signing Key <[email protected]> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.