What's the zypper's analog to apt-key command?

Hello!

Sorry for some noise, but can’t remind myself what’s the zypper’s analog to apt-key command?

Example:

# apt-key adv --keyserver keyserver.blablabla.com --recv XXXXXXXX

Most of docs for external software describe installing algos for Debian/Ubuntu distro’s only (unfortunately). And sometimes it takes a lot of time to convert dpkg/apt commands to zypper’s analogs in mind, when you read the docs.

So, some help 'll be appreciated here. Thanks!

Hi,

I’m not sure what you’re looking for but have a look at the Rosetta file :slight_smile:

https://wiki.archlinux.org/index.php/Pacman/Rosetta

Good luck…

I’ve never use “apt-key”. But maybe check the man page for “rpmkeys”.

it that’s a method for importing a package key, opensuse (and other rpm based distro’s) it’s done by the rpm command not zypper

rpm --import /path/to/keyfile

http://doc.opensuse.org/documentation/leap/reference/html/book.opensuse.reference/cha.sw_cl.html#sec.rpm.package_auth
most of the time this is not needed if a repository has been properly configured just by adding it you import it’s key
for example adding packman for 42.1 with zypper

zypper ar -f ftp://packman.inode.at/suse/openSUSE_Leap_42.1/ packman

zypper imports packman’s digital key from ftp://packman.inode.at/suse/openSUSE_Leap_42.1/repodata/repomd.xml.key
you only need to use rpm --import if a software vendor has not configured a proper repository, like adobe or google do, while google does provide it’s sign key adobe does not

Hi
Just use gpg to grab a key from the key server and import, if you adding an openSUSE repo, use the -g option when adding.

See https://forums.opensuse.org/showthread.php/512615-How-do-I-un-trust-a-repo?highlight=yast+gpg

For zypper;


zypper ar -f -g -n "some_repo_name" http://some_repo_url some_repo_name

Wow! Excellent table, thanks, although contains no ‘apt-key’ substring. Have put in bookmarks!

Yes, thanks!

ok, so direct analog is ‘rpm --import’. Or rpmkeys. Got it.

Don’t overlook the case that zypper also uniquely(compared to other package management systems AFAIK) supports automatically accepting keys, so you can skip importing keys in preparation for adding the repo

I wrote the following wiki page which provides examples for a few of my most useful zypper options

https://en.opensuse.org/User:Tsu2/BASH_zypper

TSU