Git Security Warning: Storing Personal Access Tokens in Plaintext `~/.git-credentials`

`credential.helper=store` saves unencrypted PATs on disk readable by any local process.

Runs locally in browser Free · No login Independently Verified 2026-11-25 v4.1.0
Identifier: Git Security Warning Platform: Git
Common Root Causes:
  • `credential.helper=store` saves unencrypted PATs on disk readable by any local process.

Interactive Diagnostic Checklist

Verified Solutions:
  1. Use SSH Ed25519 keys with passphrase or OS keychain / `gh auth login` instead of plaintext store.
Safe Diagnostic Command:
git config --show-origin credential.helper
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.

Technical Explanation

`credential.helper=store` saves unencrypted PATs on disk readable by any local process. Recommended diagnostic: `git config --show-origin credential.helper`. Remediation: Use SSH Ed25519 keys with passphrase or OS keychain / `gh auth login` instead of plaintext store.

Worked Examples

  • Run `git config --show-origin credential.helper` to verify root cause before applying the remediation.

Limitations & Assumptions

  • Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.

Source References & Verification

Resource ID: err-linux-git-credential-plaintext-warning · Independently verified: 2026-11-25

Related Resources