Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Linux] failed to unlock correct collection '/org/freedesktop/secrets/aliases/default' #116

Open
songant opened this issue Oct 28, 2024 · 2 comments

Comments

@songant
Copy link

songant commented Oct 28, 2024

Using go-keyring to save passwords locally works fine on Mac and Windows, but reports an error on Linux: failed to unlock correct collection '/org/freedesktop/secrets/aliases/default'. gnome-keyring and dbus-x11 has been installed on the virtual machine. This is a desktop-free environment

@timwehrle
Copy link

Shouldn't this limitation be documented in the README? The current situation significantly limits the usability of the library to only two operating systems, and the README still claims that it works on Linux. Without a functional workaround, users are forced to resort to unsafe practices such as leaking their tokens through shell history or hardcoding them into configuration files.

@mikkeloscar
Copy link
Member

You can see how we test the library on a headless Linux environment here:

- name: Test
run: |
echo 'somecredstorepass' | gnome-keyring-daemon --unlock
go test -v ./...
shell: dbus-run-session -- bash --noprofile --norc -eo pipefail {0}

It works on Linux, but there are prerequisites like a working keyring. The tool is intended for human users to store credentials which normally assumes a desktop environment. Contributions are welcome on how to make it work or document limitations for other environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants