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

Getting Sync failed: failed to unlock correct collection '/org/freedesktop/secrets/aliases/default' error #268

Open
ZhichaoDuan opened this issue Sep 5, 2024 · 4 comments
Labels
blocked Issued blocked by an external dependency bug Something isn't working

Comments

@ZhichaoDuan
Copy link

I've installed snipkit with apt on my Ubuntu 20.04 server, then I got the following error..

Syncing all managers...
⣽ Syncing GitHub Gist...
Checking gist.github.com/Jason202268
Sync failed: failed to unlock correct collection '/org/freedesktop/secrets/aliases/default'
✗ Sync did not finish.

Any insight?

@lemoony
Copy link
Owner

lemoony commented Sep 10, 2024

Hi @ZhichaoDuan ,

please run the command on trace level: snipkit manager sync -l trace, then provide the contents of the latest log file (<SNIPKIT_HOME>/.log/log).

The output from snipkit info may also be beneficial.

Thanks!

@Jason202268
Copy link

Thanks for your reply. Here is the output of the log

12:20:12 DBG 1 config/service.go:77 > SnipKit Home: /home/duanzhichao/.config/snipkit
12:20:12 TRC 1 ui/themes.go:63 > Chosen theme: default.light
12:20:12 TRC 1 ui/themes.go:63 > Chosen theme: default.light
12:20:12 TRC 1 ui/tui.go:107 > Color profile: 1
12:20:12 INF 1 managers/provider.go:53 > Number of enabled managers: 1
12:20:12 TRC 191 githubgist/manager.go:89 > github gist sync started
12:20:12 ERR 191 githubgist/manager.go:94 > error="Sync failed: failed to unlock correct collection '/org/freedesktop/secrets/aliases/default'" Sync failed

Here is the info:

Config path: /home/duanzhichao/.config/snipkit/config.yaml
SNIPKIT_HOME: /home/duanzhichao/.config/snipkit
Theme: default
GitHub Gist enabled: true
GitHub Gist number of URLs: 1
GitHub Gist total number of snippets: 0

I love this tool and really look forward to solve this!

@lemoony
Copy link
Owner

lemoony commented Nov 14, 2024

I was a bit stuck on this - but as it turns out, this issue is related to zalando/go-keyring#116

This has been a bug of go-keyring for a couple of months now. To my knowledge, there aren't any good alternatives to this library. For the time being, I will solve this introduce a workaround for this by storing the access token for github in a dedicated file.

I know that this is not ideal security-wise but other projects do this similarly (and, in the end, the access token should be restricted in its scope). This will be an opt-in workaround and removed as soon as the related issue is fixed.

@lemoony lemoony added the bug Something isn't working label Nov 14, 2024
@lemoony
Copy link
Owner

lemoony commented Nov 14, 2024

Release 1.6.0 provides a workaround for this.

Please have a look at: https://lemoony.github.io/snipkit/latest/configuration/overview/#secret-storage

@lemoony lemoony added the blocked Issued blocked by an external dependency label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Issued blocked by an external dependency bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants