How to fix problem: gpg: no valid OpenPGP data found - linux

I'm installing mongodb
I'm trying to import public key with this: wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add - (this link is from official site)
But I'm always recieving error like this: gpg: no valid OpenPGP data found.
I tried to fix problem with: --no-check-certificate
But when I run code same error shows me.
How do I fix this problem?

Related

Having difficulty to get SSH with a Yubikey working with macOS monterey

I'm following the FIDO U2F instructions on https://developers.yubico.com/SSH/ on macOS Monterey with openSSH 8.6 and run into the following issue:
~ ssh-keygen -t ecdsa-sk -f ~/.ssh/id_ecdsa_sk
Generating public/private ecdsa-sk key pair.
You may need to touch your authenticator to authorize key generation.
Key enrollment failed: unknown or unsupported key type
Anyone know what I'm missing here?
Use Homebrew's OpenSSH
$ brew install openssh
Once installed, you have to override the one in your PATH by putting the openssh folder at the beginning of your PATH in your rc file like this
$ export PATH=$(brew --prefix openssh)/bin:$PATH
Once you've done that and you've sourced your rc file you should be able to generate your key
Tested on macOS Monterey and OpenSSH_8.8p1, OpenSSL 1.1.1l

When does GPG load its keys?

On an OpenWRT installation, I have an update script that downloads a file and checks its GPG signature.
If I run this script at boot in rc.d at priority 99 (it's the last one), I get a "gpg: Can't check signature: public key not found" error. If I run it via Cron or manually, everything works.
I also tried to add a 60 second sleep before running the script.
Is there a way to know when GPG finished its init?
Can you post the script you use?
A possible solution would be to add the public key import as part of the script before you check the signature, so it's always available for gpg.
This answer may also shed some light on this error: Can't check signature: public key not found
Turns out, scripts in rc.d are not run as root, or the root home is not specified yet (?), so the home directory where GPG is looking for signatures is different (it's looking at //.gnupg/ instead of /root/.gnupg/).
Adding the homedir parameter to GPG allows to specify the directory; this works:
gpg --homedir /root/.gnupg/ --verify update.gpg

Linux gpg to encrypt a file but it does nothing?

I thought this is how to encrypt a file in linux with gpg.
So,
xxx#xxx:~$ gpg -c /home/xxx/secretfilename.txt
But it does nothing but this,
usage: gpg [options] --symmetric [filename]
Any idea what this means and what have I done wrong?
You are attempting to use GPG to encrypt data without sufficient understanding. While it can do symmetric encryption, most use cases for GPG use public/private key encryption (see "public-key cryptography" in the FAQ), and the default CAST5 is not the best choice today.
First, try
gpg -v --version
to see what version of gpg you're currently working with.
Then, study!
Please have the GnuPG FAQ open for reference.
Then start with the GnuPG MiniHOWTO
Then refer to the GnuPG Manual

Automating Enter keypress not working for Linux Mint 15

I've got this post installation script I made for users of Linux Mint 14 (and also usable on Ubuntu 12.10) and now I'm testing it for Linux Mint 15 and the 'echo -ne "\n" | sudo add-apt-repository ppa:some-ppa-to-add' command isn't working on Linux Mint 15, but still works on Mint 14. I want to update this script for the new version of Linux Mint.
Here's a link to my post install scipt: The Minty Developer
The output for Mint 14 looks like this:
$ echo -ne "\n" | sudo add-apt-repository ppa:apt-fast/stable
You are about to add the following PPA to your system:
This PPA contains tested (stable) builds of apt-fast.
More info: https://launchpad.net/~apt-fast/+archive/stable
gpg: keyring `/tmp/tmpddxueh/secring.gpg' created
gpg: requesting key CA8DA16B from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpddxueh/trustdb.gpg: trustdb created
gpg: key CA8DA16B: public key "Launchpad PPA for apt-fast" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
And here's the output on Mint 15:
$ echo -ne "\n" | sudo add-apt-repository ppa:apt-fast/stable
You are about to add the following PPA to your system:
This PPA contains tested (stable) builds of apt-fast.
More info: https://launchpad.net/~apt-fast/+archive/stable
And that's it. Nothing happens.
I've also tested doing just echo | ppa:some-ppa-to-add and it's the same results.
Can anyone help me figure out how to make this line of code/command work so that the script can be updated for those interested in using it with a new version of their system?
Thank you.
You could use add-apt-repository --yes but you are overriding a system-wide security policy by answering that question.
You don't say who the user is; I would be annoyed if your script did that for me, but I'm not a typical end-user. I just looked at your script, and it is conversational enough generally. If it said something like
I'm going to add these packages from reasonably trustworthy sources and set them up so they will automatically update, etc., etc.
it would be more polite.
Added
There is an undocumented feature in add-apt-repository which allows you to override the question programmatically:
if (sys.stdin.isatty() and
not "FORCE_ADD_APT_REPOSITORY" in os.environ):
if options.remove:
print(_("Press [ENTER] to continue or ctrl-c to cancel removing it"))
else:
print(_("Press [ENTER] to continue or ctrl-c to cancel adding it"))
sys.stdin.readline()
Thus the bash sequence
export FORCE_ADD_APT_REPOSITORY=force
sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo add-apt-repository ...
should stop the questions. It will still show the noise
You are about to add the following PPA to your system:
Sublime Text 2 packages - the .deb will automatically download the
latest build from http://www.sublimetext.com/dev or beta from
http://www.sublimetext.com/2 (Adobe Flash Player installer - style).
More info and feedback:
http://www.webupd8.org/2011/03/sublime-text-2-ubuntu-ppa.html
http://www.webupd8.org/2012/03/sublime-text-2-ppa-separate-development.html
More info: https://launchpad.net/~webupd8team/+archive/sublime-text-2
but that is put on stdout so should be able to be sent to > /dev/null with errors still appearing on stderr.

viewing IE on linux problem

i am following the following steps from website:
http://www.tatanka.com.br/ies4linux/page/Installation:Ubuntu
but when i run the wget i get an error:
helloises#helloise:~$ sudo wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -
gpg: no valid OpenPGP data found.
i have no idea what this means?
can anyone help please?
thanks
That's because the URL you are trying to download gives a 404 error. The key may have been moved to another location. Contact the one whose key you are trying to add.

Resources