Page 1 of 1

[solved] getting the error “Medium without key”

PostPosted: Sep 20th, '19, 20:46
by nsh12345
O.S: Mageia 5 and 6

Problem:

1. I build rpm , sign it and add it to my private repo.
2. I exported my key using the command gpg --export -a 'MY NAME' > RPM-GPG-KEY-pmanager
3. I took this key and imported it to the PC where I want to install the rpm using rpm --import
4. I have the error
Code: Select all
 /var/cache/urpmi/rpms/my_rpm_name.rpm: Medium without key (OK (RSA/SHA1, Mon 16 Sep 2019 03:50:12 PM EEST, Key ID 351f1c3ab40c2563))

From the PC where I wat to install the rpm
I can see the key
Code: Select all
rpm -qa | grep ^gpg-pubkey-
gpg-pubkey-b40c2563-58ecf275

Code: Select all
rpm -q gpg-pubkey --qf '%{name}-%{version}-%{release} --> %{summary}\n'
gpg-pubkey-b40c2563-58ecf275 --> gpg(NAME & email here)

What I am missing ? Thanks

Re: getting the error “Medium without key”

PostPosted: Sep 20th, '19, 23:30
by doktor5000
How do you install the rpm in question on the target machine in particular? And did you add that repo on the target machine and if so, how? Also, is the exported key contained in your repository, if so what filename did you use and where did you put it, and how did you create your repository in the first place ? Usually when you use genhdlist2 to create the repository metadata the key should be located in the media_info subfolder as file "pubkey".

If you added the repo on the target machine, depending on how you did it you still need to associate the key with your repository.
Check here: http://doc.mageia.org/mcc/7/en/content/ ... tml#d4e273 (the section Options -> Manage keys)

An actual example for this is also explained in our MAQeia for Chrome, where this is also required for the google repo: viewtopic.php?f=36&t=2053

One extra step is needed: associating the key with the Google repository.

  • From the Software Management window, go to Options menu -> Media Manager.
  • From the Configure Media window, go Options menu -> Manage keys.
  • Scroll down to sellect the chrome_* medium, and click the Add button.
  • Select the Google signing key 7fac5991, click OK.

Re: getting the error “Medium without key”

PostPosted: Sep 24th, '19, 13:29
by nsh12345
Thank you so much.
I added the key to the media directory and indeed this solved the error.
Code: Select all
gpg --export -a 'MY NAME' > pubkey