How to use Gnome Passwords / Keyring with Forge #462
Replies: 2 comments
-
Thanks! I think that would make a nice addition to https://github.com/magit/forge/wiki/Tips-and-Tricks. (But use only two semicolons for comments (three and more are for outline headings) and don't put the closing parenthesis on its own line; that makes certain people nervous.) |
Beta Was this translation helpful? Give feedback.
-
I just tried this with KeepassXC and it worked on GitLab. I then used this call from comment #433 (comment) (ghub--token "api.github.com" "zoechi" 'forge) and it turned out it uses the GitLab token instead the GitHub one. I passed the (secrets-search-items "keyring" :user "zoechi^forge" :host "api.github.com")
(secrets-search-items "keyring" :user "zoechi^forge" :host "gitlab.com/api/v4")
(auth-source-search :host "api.github.com" :user "zoechi" :create t)
(auth-source-search :host "gitlab.com/api/v4" :user "zoechi" :create t) All return correct entries. Any idea how I could solve this without changing one user name? (I'm not even sure different usernames would fix this) Edit:Sorry for the noise. |
Beta Was this translation helpful? Give feedback.
-
Posting this here because it might help someone else, or might make its way into the manual:
Add this to your init to instruct emacs to use the secrets api (aka gnome passwords/keyring)
You need to eval this after you set the auth source as above, to create a secret in the gnome keyring with the fields you want since you cannot do this from the UI:
Beta Was this translation helpful? Give feedback.
All reactions