Hello there,
I’m trying to upload a snap to the snapstore using the SNAPCRAFT_STORE_CREDENTIALS environment variable that holds the value of the authentication key. I do this from an Azure release pipeline in a command line task. This is my script :
set -x
snap version
lxd --version
sudo apt-get update
sudo snap install --classic snapcraft
sudo snap install multipass
export PATH="${PATH}:/snap/bin"
echo $SNAPCRAFT_STORE_CREDENTIALS
snapcraft --version
sudo snapcraft --debug --destructive-mode
sudo snapcraft upload my_app_3.1_amd64.snap --release=latest/beta --verbosity=trace
And this is the error I get :
craft-store error: No keyring found to store or retrieve credentials from.
Recommended resolution: Ensure the keyring is working or SNAPCRAFT_STORE_CREDENTIALS is correctly exported into the environment
For more information, check out: https://snapcraft.io/docs/snapcraft-authentication
When I try to use a keyring on a headless Linux system according to the documentation page : Snapcraft documentation. The execution blocks forever at the line
dbus-run-session -- sh
displaying this error
dbus[3496]: Unable to set up transient service directory: XDG_RUNTIME_DIR "/run/user/1001" is owned by uid 1001, not our uid 0
How can I avoid this error.
And according to the documentation, the next command is :
gnome-keyring-daemon --unlock
which can be unblocked by typing the password and CTRL+D which is not possible using a CI/CD pipeline…
How is it supposed to be done ?
Thanks for your help !
This is my configuration
snap 2.57.2
snapd 2.57.2
series 16
ubuntu 20.04
kernel 5.15.0-1022-azure
lxd --version
4.0.9
snapcraft --version
7.2.7