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

Error Failed to access secure storage (keyring): Platform secure storage failure: DBus error: The name org.freedesktop.secrets was not provided by any .service files... #879

Closed
raymelon opened this issue Jan 29, 2025 · 9 comments
Assignees

Comments

@raymelon
Copy link

Hello, I am getting this error in Ubuntu 24.04.1 LTS

Curious:

  1. How to bypass keyring (is there a flag in goose CLI to do this?)

  2. Where to set environment variables (which I assume will be system-wide or has to be attached manually for every CLI instance)

Stacktrace:

 > goose configure

Welcome to goose! Let's get you set up with a provider.
  you can rerun this command later to update your configuration

┌   goose-configure

◇  Which model provider should we use?
│  Google Gemini

◇  Provider Google Gemini requires GOOGLE_API_KEY, please enter a value
│  ▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪


  Error Failed to access secure storage (keyring): Platform secure storage failure: DBus error: The name org.freedesktop.secrets was not provided by any .service files
  Please check your system keychain and run 'goose configure' again.
  If your system is unable to use the keyring, please try setting secret key(s) via environment variables.
@raymelon
Copy link
Author

raymelon commented Jan 29, 2025

Additional context:

Installed goose CLI via CANARY channel

curl -fsSL https://github.com/block/goose/releases/download/stable/download_cli.sh | CANARY=true bash

More details on CANARY channel:

#861 (comment)

@kalvinnchau
Copy link
Collaborator

kalvinnchau commented Jan 29, 2025

The easiest way to set your environment variables would be either:

  • export GOOGLE_API_KEY=$YOUR_KEY_HERE - for the duration of your session
  • in your ~/.bashrc or ~/.zshrc (or any other shell you may be using) so it persists on new shell each new session

Then when you run goose configure it'll detect that variable (which will change depending on provider) and select No when it asks to save to the keyring:

$ export GOOGLE_API_KEY=test # put your API key here instead of test
$ goose configure

Welcome to goose! Let's get you set up with a provider.
  you can rerun this command later to update your configuration

T   goose-configure
|
o  Which model provider should we use?
|  Google Gemini
|
•  GOOGLE_API_KEY is set via environment variable
|
o  Would you like to save this value to your keyring?
|  No
|
o  Enter a model from that provider:
|  gemini-2.0-flash-exp
|
O  Checking your configuration...
|
o  Hello! I'm Goose, and you're all set to go, feel free to ask me anything.
|
—  Configuration saved successfully       

  Tip: Run 'goose configure' again to adjust your config or add extensions  

Then you can start your session:

$ goose session
starting session | provider: google model: gemini-2.0-flash-exp
    logging to /root/.config/goose/sessions/vE3K0kc9.jsonl


Goose is running! Enter your instructions, or try asking what goose can do.


( O)> hi
Hi! How can I help you today?

( O)>

@kalvinnchau
Copy link
Collaborator

@raymelon added some docs in our troubleshooting section, https://block.github.io/goose/docs/troubleshooting#keychainkeyring-errors - let us know if that works for you and we can close this

@sanjaysanjel019
Copy link

I got the same issue today but the steps mentioned by @kalvinnchau worked fine for me.

Thank you @kalvinnchau

@tgruben-circuit
Copy link

mine works fine from the cli, but when i attempt to launch the desktop app it gets stuck in a loop attempting to access my keyring, Have any suggestions?

@raymelon
Copy link
Author

raymelon commented Feb 3, 2025

The easiest way to set your environment variables would be either:

  • export GOOGLE_API_KEY=$YOUR_KEY_HERE - for the duration of your session
  • in your ~/.bashrc or ~/.zshrc (or any other shell you may be using) so it persists on new shell each new session

Then when you run goose configure it'll detect that variable (which will change depending on provider) and select No when it asks to save to the keyring:

$ export GOOGLE_API_KEY=test # put your API key here instead of test
$ goose configure

Welcome to goose! Let's get you set up with a provider.
you can rerun this command later to update your configuration

T goose-configure
|
o Which model provider should we use?
| Google Gemini
|
• GOOGLE_API_KEY is set via environment variable
|
o Would you like to save this value to your keyring?
| No
|
o Enter a model from that provider:
| gemini-2.0-flash-exp
|
O Checking your configuration...
|
o Hello! I'm Goose, and you're all set to go, feel free to ask me anything.
|
— Configuration saved successfully

Tip: Run 'goose configure' again to adjust your config or add extensions
Then you can start your session:

$ goose session
starting session | provider: google model: gemini-2.0-flash-exp
logging to /root/.config/goose/sessions/vE3K0kc9.jsonl

Goose is running! Enter your instructions, or try asking what goose can do.

( O)> hi
Hi! How can I help you today?

( O)>

Thanks! Will try this out

@ciertou
Copy link

ciertou commented Feb 5, 2025

i got the same issue today but the steps mentioned by @kalvinnchau worked fine for me. thanks @kalvinnchau

@baxen
Copy link
Collaborator

baxen commented Feb 7, 2025

We've updated the docs and the configure script to make this workaround easier to find, so closing this out for now! Feel free to reopen if there are issues where env vars don't work

@baxen baxen closed this as completed Feb 7, 2025
@fortunto2
Copy link

goose 1.0.9 and Azure OpenAI (worked on Mac, but not in ubuntu server)

goose s

thread 'main' panicked at /home/runner/work/goose/goose/crates/goose-cli/src/session/builder.rs:32:64:
Failed to create provider: Failed to access keyring: Couldn't access platform secure storage: Secret Service: no result found
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
goose configure

Welcome to goose! Let's get you set up with a provider.
  you can rerun this command later to update your configuration

┌   goose-configure 
│
◇  Which model provider should we use?
│  Azure OpenAI 
│
◇  Provider Azure OpenAI requires AZURE_OPENAI_API_KEY, please enter a value
│  ▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪
│

  Error Failed to access secure storage: Couldn't access platform secure storage: Secret Service: no result found 
  Please check your system's secure storage and run 'goose configure' again. 
  If your system is unable to use secure storage, please try setting secret key(s) via environment variables.

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

7 participants