add repo in script


After 1 an half month building a very very basic install package script for my susestudio xfce I have a problem:
How to add a repo with the keys verification, e.g:

But zypper ref after there is always a problem because is asking for the trust question.

Observ: I’m just trying to easy install some apps like spotify and others that you need some extra work, it 's a personal learning process.

Why not just add the packages to your SUSE Studio image by adding the relevant repositories?

Anyway, you need to script out importing the gpg keys for the repoistory, see here;

You are using your zypper flags incorrectly.
I describe how to do this correctly using those flags with the “zypper ref” command in my Wiki page describing adding Elasticsearch repos

So, in your case the following should work

zypper ar -f gnomeApps LEAP_42.1_GnomeApps && zypper ref --gpg-auto-import-keys         


Didn’t notice your reponame.
Modified which should work

zypper ar -f gnomeApps  && zypper ref --gpg-auto-import-keys