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

No such interface 'org.freedesktop.Secret.Collection' on object at path /org/freedesktop/secrets/collection/login #18

Open
winteraz opened this issue Aug 16, 2017 · 6 comments

Comments

@winteraz
Copy link

winteraz commented Aug 16, 2017

The example from the readme file throws an error on keyring.Set(service, user, password)``:
No such interface 'org.freedesktop.Secret.Collection' on object at path /org/freedesktop/secrets/collection/login

Any idea why is that? If I run it with sudo the program just get stuck

package main

import (
    "log"

    "github.com/zalando/go-keyring"
)

func main() {
    service := "my-app"
    user := "anon"
    password := "secret"

    // set password
    err := keyring.Set(service, user, password)
    if err != nil {
        log.Fatal(err)
    }

    // get password
    secret, err := keyring.Get(service, user)
    if err != nil {
        log.Fatal(err)
    }

    log.Println(secret)
}
@winteraz
Copy link
Author

uname -a
Linux ubuntu 4.8.0-36-generic #36~16.04.1-Ubuntu SMP Sun Feb 5 09:39:57 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

@szuecs
Copy link
Member

szuecs commented Aug 16, 2017

@winteraz do you have gnome-keyring installed?

@nvkv
Copy link

nvkv commented Oct 22, 2019

Same here. Amazon Linux 2 (AWS Linux Workspace), gnome-keyring is installed.

@ghost
Copy link

ghost commented Feb 28, 2020

Same here, ubuntu 18.04 and gnome-keyring is installed.

@mikkeloscar
Copy link
Member

Does it help to create it maually as described here? https://github.com/zalando/go-keyring#linux

@jonhadfield
Copy link

Take a look at: #45 where I've managed to get it running on docker with Ubuntu 18.04.

jakedoublev added a commit to opentdf/otdfctl that referenced this issue May 3, 2024
…142)

The main goal of this is to:
	1. cache on the user's OS by default
2. allow auth without caching when desired (for example Ubuntu has known
[gnome keyring issues](zalando/go-keyring#18))
3. allow flexibility in how non-cached auth is passed into the CLI,
knowing that `stdin` isn't always an open option for all authenticated
commands
4. take inspiration from nice CLIs like [gcloud
--cred-file](https://cloud.google.com/sdk/gcloud/reference/auth/login#:~:text=complete%20the%20authorization.-,%2D%2Dcred%2Dfile%3DCRED_FILE,-Path%20to%20the)
and [gh
--with-token](https://cli.github.com/manual/gh_auth_login#:~:text=browser%20to%20authenticate-,%2D%2Dwith%2Dtoken,-Read%20token%20from)
5. continue to authenticate to the platform via
`sdk.WithClientCredentials`

Demo:
https://www.loom.com/share/96327c747ad94551a7487fc51fe31a7f?sid=6e2b81e1-7fe7-4f9f-8f34-0f6dd2a23ca6
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

5 participants