jonhadfield/sn-cli

Unable to use. Not clear dependencies

alexkutsan opened this issue · 2 comments

As base distributive used ubuntu:latest docker image.

Initial setup failed with :

sn session --add
error: exec: "dbus-launch": executable file not found in $PATH

Found following fix : sudo apt install dbus-x11
Not sure that dbus-x11 is not to much for terminal client

Next error :

root@48a967651990:~# sn session --add 
error: The name org.freedesktop.secrets was not provided by any .service files

Found solution on Foundry376/Mailspring#681 :
apt install gnome-keyring

Next Error :

sn session --add 
error: failed to unlock correct collection '/org/freedesktop/secrets/aliases/default'

Didn't found quick solution for this.

Hi @alexkutsan
I thought it was an issue with the library I was using so went to raise an issue with them: zalando/go-keyring#45.
As I recreated the issue I came across a fix. Here are the steps that work for me:

docker run --privileged -it ubuntu:18.04 /bin/bash
apt update && apt install -y curl dbus-x11 gnome-keyring 
curl -L -O https://github.com/jonhadfield/sn-cli/releases/download/0.0.16/sncli_linux_arm64
install sncli_linux_arm64 /usr/local/bin/sn
dbus-run-session -- sh
gnome-keyring-daemon --unlock

enter a password and then ctrl^D to leave it running in background
You should now be able to sn-cli, providing you don't exit that shell.

Closing, but please shout if you think anything is unresolved.