-
Notifications
You must be signed in to change notification settings - Fork 493
Open
Description
gog auth remove does not clean up config.json entries
Describe the bug
When running gog auth remove <email>, only the token is removed from ~/.config/gogcli/keyring/. However, related entries in ~/.config/gogcli/config.json (such as account_aliases, account_clients) that reference the removed account are left behind.
Steps to reproduce
- Add an account with an alias:
gog auth add [email protected] gog auth alias set myalias [email protected] - Remove the account:
gog auth remove [email protected] - Inspect
config.json:gog config list
Expected behavior
gog auth remove <email> should also remove any references to that email from config.json, including:
account_aliasesentries pointing to the removed emailaccount_clientsentries for the removed email
Actual behavior
Stale entries remain in config.json after the token has been removed. This causes gog config list to show references to accounts that no longer exist.
Notes
credentials.json/credentials-<client>.jsonintentionally should not be removed, as it is shared across accounts (OAuth client credentials from Google Cloud). This is expected behavior.- The leftover config entries don't cause errors currently, but they are confusing and could potentially cause unexpected behavior with alias resolution.
Environment
- OS: Linux
- Keyring backend: file (
~/.config/gogcli/keyring/) - gogcli version: 0.12.0 (Homebrew 2026-03-09T05:52:34Z)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels