feat: git credential backend for credential storage #371
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
barrettruth/cp.nvim!371
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/security"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Credentials were stored as plaintext JSON in
stdpath('data')/cp-nvim.json, with no integration with system credential managers.Solution
Replace file-based credential storage with
git credential fill/approve/reject, delegating to whatever credential helper the user has configured (cache,store,libsecret, macOS Keychain, etc.).lua/cp/git_credential.luamodule wrapping the git credential protocolcredentials.lua,submit.lua,scraper.lua) usegit_credentialdirectly —cache.luano longer handles credentialspassword<TAB>token) so it works with helpers that ignore thepathfieldhas_helper()guard on:CP login,:CP logout, and:CP submitwith an error message if no helper is configured[required]/[optional]sections; git version and credential helper status showngitchecked at startup incheck_required_runtime()CACHE_VERSION, v1→v2 migration) removed — the cache file is now a plain JSON blob:CPcommand getsbar = true