TRAMP re-prompts for credentials when auth-source test store is configured
0 reputation · 08 Aug 2020, 06:24 UTC
When exercising a remote-file workflow with a dedicated test credential store, the expectation is that auth-source supplies the test user name and secret to TRAMP without interactive prompts. In practice, TRAMP sometimes requests the password again even though a matching entry exists in the test authinfo file pointed to by auth-source-sources.
The prompting behavior appears to depend on the interplay between auth-source caching, TRAMP connection persistence (tramp-use-ssh-controlmaster-options), and the SSH control socket lifetime. These variables are version sensitive: Emacs 29 changed the default for connection reuse, and the auth-source backend selection order can shift when multiple sources are present.
A test profile isolates configuration by setting user-emacs-directory to a temporary tree and loading a minimal init that defines only the test authinfo file. Restarting Emacs clears in-memory caches, yet the prompt still occurs on the second connection attempt to the same host.
- Which combination of
auth-sourcecache variables and TRAMP persistence settings guarantees a single prompt per session when using a test credential store? - Does the presence of a system-wide
/etc/authinfoor~/.authinfo.gpginterfere with backend selection in a way that bypasses the test store?