Error while executing 'zypper refresh'

Hi Guys,

We have an enterprise product which works on various Linux systems (RH, SLES, Ubuntu, CentOS etc.).
To publish regular updates to our product, we have created a custom product repository and hosted it on Amzon S3 bucket. While installation of our product we create a repo file under /etc/zypp/repos.d directory, so that customers can connect to our repository and update the product to latest version using zypper.

We are facing few issues on SLES 12. I would really appreciate if you can help me with it. Following are the details of these issues:

After executing ‘zypper clean’ if you execute ‘zypper refresh’ command, it tries to search for a non-existent file viz. media.1/media in our repository and waits for user input
Permission to access ‘/sles12/x86_64/media.1/media’ denied.
Abort, retry, ignore? [a/r/i/…? shows all options] (a):
Observation in this case is little interesting, if you execute ‘zypper clean –a’ indicating clean all the metadata, and then execute ‘zypper refresh’ then this behaviour is NOT observed. So possibly when you execute only ‘zypper clean’; it might not be cleaning all the repo metadata.
I did not find useful documentation which says how to create media directory in the repository.

File ‘repomd.xml’ from repository ‘SDCSS repository for package updates’ is unsigned, continue? [yes/no] (no):
After upgrading zypper to zypper-1.13.39-18.25.6.x86_64 version, we started getting this warning message.
since our product is installed on multiple Linux flavours we want to maintain only one GPG key. Hence we have created a GPG key on a CentOS machine. This key is used to sign all our product packages.
We tried to use the same key for signing repomd.xml file on our repository, and also placed .key and .asc file in the same location of repomd.xml. But from a client machine when we execute ‘zypper refresh’ command, we get an error saying that repomd.xml is signed with unknown key e.g.:
File ‘repomd.xml’ from repository ‘SDCSS repository for package updates’ is signed with an unknown key ‘83716237093FE940’. Continue? [yes/no] (no):

We are creating our repository using createrepo command.
Since zypper is waiting for an user input before proceeding, it will break the automation created by our customers.

If you can give some pointers in this regard, it will be really helpful for me.


P.S: Please let me know if this is not the correct forum to ask this question.

Once upon a time I hit an issue with a client that sounds similar, and
here are some notes from then:

#Used strace to find /etc/zypp/services.d which had a file causing the error.[color=blue]
> strace -s 999 -ttt -ff zypper dup >zypper.strace 2>&1[/color]

Feel free to try out the command above, or just look under
/etc/zypp/services.d to see if something in there is old, and clean it out
from there.

Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.