Craft-store error: Credentials found for 'snapcraft' on ''

I’m about to release NetBeans 17-rc1 to our edge channel, when realized that the login --with is not supported any more. I’ve crated a Snapcraft 7.x style credentials (the base64 encoded one), uploaded that to our Apache Jenkins credential store, updated our build steps, but can’t get the login working with the error above. The base64 credential is now passed as a build environment variable ``` SNAPCRAFT_STORE_CREDENTIALS

The logs are available at:

Unfortunately those do not tell too much.

Well, I’ve checked the code of the craft-store. I might read the python code wrong, but it seem it misinterprets the absence of keystores so say that it already found the credentials stored.

If your flow first does a snapcraft login (which used to persist the login info somewhere) and then tries to do other operations like push, release and so on, you will likely need to change it.

With snapcraft 7.x you either log in or set the variable, but not both. If you are setting the variable, all commands use that information and don’t require the explicit login before.

Export the variable before running any other snapcraft commands and with the variable set, they should all behave as if they were logged in.