Add file-based fallback for token storage when dbus unavailable#19
Merged
Add file-based fallback for token storage when dbus unavailable#19
Conversation
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add fallback to file for key-chain on Linux without dbus
Add file-based fallback for token storage when dbus unavailable
Nov 14, 2025
Contributor
|
@copilot Nope. Extract the key-ring logic to a new file (internal/keyring/keyring.go) and internal/keyring/keyring_linux.go which just uses files for the moment. |
…mplementations Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
alexec
approved these changes
Nov 14, 2025
Contributor
Author
Done. Refactored to use platform-specific implementations:
Commit: 6f2ced0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactored keyring implementation per feedback
internal/keyring/keyring.gointernal/keyring/keyring_linux.gowith file-based storageinternal/keyring/keyring_darwin.gowith system keyringinternal/keyring/keyring_windows.gowith system keyringinternal/config/config.goto use new keyring packageImplementation Details
New Package Structure
internal/keyring/keyring.go: DefinesProviderinterface and package-levelSet/Getfunctionsinternal/keyring/keyring_linux.go: Linux-specific implementation using file storage only (no dbus dependency)internal/keyring/keyring_darwin.go: macOS implementation using system keyringinternal/keyring/keyring_windows.go: Windows implementation using system keyringLinux File Storage
On Linux, tokens are stored in
~/.config/jira-cli/tokenas JSON:{ "host1.atlassian.net": "token1", "host2.atlassian.net": "token2" }Platform Selection
Go build tags automatically select the correct implementation:
Testing
All tests pass (11 total):
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.