Libgpgme error during zypper ref

I’ve problem with chrooted system and I don’t know how to deal with it. When I try to refresh repos via zypper I get:

localhost:/ # zypper ref 4
Retrieving repository 'Repozytorium główne (OSS)' metadata ..............[error]
Repository 'Repozytorium główne (OSS)' is invalid.
[download.opensuse.org-oss|http://download.opensuse.org/tumbleweed/repo/oss/] Valid metadata not found at specified URL
History:
 - libgpgme error in 'gpgme_ctx_set_engine_info': <GPGME> Invalid crypto engine

Please check if the URIs defined for this repository are pointing to a valid repository.
Skipping repository 'Repozytorium główne (OSS)' because of the above error.
Could not refresh the repositories because of errors.
localhost:/ #

Is it normal because it’s chroot? Or I miss something else?

I’m able to connect with this repo. w3m http://download.opensuse.org/tumbleweed/repo/oss/ shows me contents of it.

Assuming that chroot means full installation - no, it is not. But you did not describe how exactly you set up your chroot, so something may certainly be missing causing this error.

You may try zypper --root ... from your “main” system instead. --root option should point to your chroot environment.

This is how I set it up:

mount /dev/sda3 /mnt/sda
mount --bind /proc /mnt/sda/proc
mount --bind /sys /mnt/sda/sys
mount --bind /dev /mnt/sda/dev
cp /etc/resolv.conf /mnt/sda/root
chroot /mnt/sda
cp /root/resolv.conf /runt/netconfig/resolv.conf

/dev/sda3 is partition with root of installed (but unbootable) Tumbleweed.

Doing zypper --root /mnt/sda ref works. Would zypper --root /mnt/sda update update packages just at /mnt/sda? Is it advisable?

For completness of this topic. After zypper --root /mnt/sda ref zypper under chroot was able to work normally, so there was no need to run update with --root parameter.