Skip to content

Store GitHub token in native keyring#229

Open
albbas wants to merge 8 commits into
mainfrom
feat/keyring-token-storage
Open

Store GitHub token in native keyring#229
albbas wants to merge 8 commits into
mainfrom
feat/keyring-token-storage

Conversation

@albbas
Copy link
Copy Markdown
Member

@albbas albbas commented Apr 21, 2026

Summary

  • store GitHub token in native OS keyring instead of plaintext user.toml
  • keep username in config file and read token from keyring at runtime
  • add transparent migration for legacy user.toml files containing token
  • add fallback to GITHUB_TOKEN environment variable when keyring entry is unavailable

Implementation

  • add keyring dependency with platform-native backends
  • update user config model to keep legacy token field read-only for migration
  • save token via keyring API during gut init
  • resolve token via keyring (or env fallback) for API requests

Notes

  • this PR intentionally does not change init token input UX yet (hidden prompt will be a follow-up PR)

@albbas
Copy link
Copy Markdown
Member Author

albbas commented Apr 29, 2026

I see that the build fails, but not why. I get "page not found" when pressing the buildkite link. On my local Mac there are no warnings from cargo fmt or cargo clippy --fix

albbas and others added 5 commits May 4, 2026 10:22
Switches the Linux keyring backend from linux-native-sync-persistent
(dbus/libdbus) to linux-native-async-persistent (zbus, pure Rust D-Bus).
zbus has no libdbus dependency, unblocking fully static musl builds on
Alpine without needing a from-source static dbus build in CI.

The async backend's blocking shim deadlocks when called from the main
thread, so all three keyring call sites are now wrapped in spawned
threads. async-io is used as the executor to avoid conflicts with
reqwest's background tokio runtime.
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

Successfully merging this pull request may close these issues.

2 participants