feat: store tokens in git credential manager instead of plaintext#138
Merged
Conversation
Deploying archgate-cli with
|
| Latest commit: |
a30c39e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a01010ea.archgate-cli.pages.dev |
| Branch Preview URL: | https://feat-git-credential-storage.archgate-cli.pages.dev |
79ba887 to
654d1dc
Compare
Replace plaintext token storage in ~/.archgate/credentials with git's native credential helpers (macOS Keychain, Windows Credential Manager, Linux libsecret) via the `git credential approve/fill/reject` protocol. This means git clone from plugins.archgate.dev works transparently — git retrieves stored credentials automatically without tokens in URLs. Changes: - New credential-store.ts using git credential approve/fill/reject - auth.ts no longer re-exports — consumers import directly from credential-store.ts (ARCH-004 compliance) - ~/.archgate/credentials kept for metadata (github_user, created_at) - Falls back to plaintext file for legacy installs - GIT_TERMINAL_PROMPT=0 + GCM_INTERACTIVE=never suppress all prompts - 3-second timeout prevents hangs when credential manager is unavailable - ARCH-004 updated to also prohibit re-exports from non-index files Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
654d1dc to
a30c39e
Compare
Merged
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
git credential approve/fill/rejectprotocolarchgate login,git clone https://plugins.archgate.dev/archgate.gitworks automatically (git retrieves stored credentials from its own credential helper)credential.helper(GCM, osxkeychain, libsecret, etc.)How it works
Storage
~/.archgate/credentialsGit authentication flow
```
```
Backwards compatibility
~/.archgate/credentialsfiles still work (fallback)user:token@host) still workFiles changed
Test plan
🤖 Generated with Claude Code