From 90b24921b780da0c9ec60f8aed256e91066df9a1 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 6 Nov 2025 17:58:40 -0600 Subject: feat: Add comprehensive authentication cache reset utility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added cj/reset-auth-cache function to recover from incorrect password entry for encrypted files like authinfo.gpg. Resolves "Bad session key" and "Decryption failed" errors. Key features: - Smart cache clearing: preserves 400-day GPG/SSH cache by default - Optional prefix arg (C-u) to also clear gpg-agent cache - Clears auth-source, EPA file handler, and optionally gpg-agent caches - Bound to C-; A for easy access (removed from debug menu C-c d) Also added cj/kill-gpg-agent for aggressive agent reset when needed. Consolidates and replaces simpler auth-source-only version that was previously in config-utilities.el. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- modules/config-utilities.el | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'modules/config-utilities.el') diff --git a/modules/config-utilities.el b/modules/config-utilities.el index 32018371..2af3effa 100644 --- a/modules/config-utilities.el +++ b/modules/config-utilities.el @@ -33,8 +33,7 @@ "C-c d i b" "info build" "C-c d i p" "info packages" "C-c d i f" "info features" - "C-c d r" "reload init" - "C-c d a" "reset auth cache")) + "C-c d r" "reload init")) ;;; --------------------------------- Profiling --------------------------------- @@ -283,15 +282,6 @@ Recompile natively when supported, otherwise fall back to byte compilation." (load-file user-init-file)) (keymap-set cj/debug-config-keymap "r" 'cj/reload-init-file) -;; ----------------------------- Reset-Auth-Sources ---------------------------- - -(defun cj/reset-auth-cache () - "Clear Emacs auth-source cache." - (interactive) - (auth-source-forget-all-cached) - (message "Emacs auth-source cache cleared.")) -(keymap-set cj/debug-config-keymap "a" 'cj/reset-auth-cache) - ;; ------------------------ Validate Org Agenda Entries ------------------------ (defun cj/validate-org-agenda-timestamps () -- cgit v1.2.3