TortoiseGit least-privilege auth on shared Windows: GCM HTTPS tokens or Pageant SSH keys?
0 reputation · 10 Mar 2024, 04:09 UTC
0 reputation · 10 Mar 2024, 04:09 UTC
We run TortoiseGit on shared Windows workstations where several developers use the same machine, and we need to pick one authentication approach that keeps credentials as tightly scoped as possible. The two documented paths are HTTPS through Git Credential Manager, which stores per-host tokens in Windows Credential Manager, and SSH through Pageant with per-repository deploy keys.
Each option has a trade-off we cannot resolve from the documentation alone. GCM tokens can be fine-grained and short-lived, and expiry normally triggers an interactive re-prompt, but a stale Credential Manager entry can cause repeated silent failures. Pageant keys avoid token storage entirely, yet a decrypted key stays in memory for the whole login session, and a revoked key just returns "permission denied (publickey)" with no recovery prompt. TortoiseGit's SSH client setting (TortoiseGitPlink vs OpenSSH) also changes which agent and key format applies.
There appears to be no TortoiseGit-level mechanism for per-user credential isolation beyond separate Windows profiles, so the enforcement burden falls on whichever store we choose.
Given a shared-machine constraint, which approach gives stronger least-privilege guarantees: per-user GCM tokens or per-session Pageant keys? How should expired-credential recovery differ between the two in day-to-day operation? Does the TortoiseGitPlink versus OpenSSH choice materially change the isolation story?
For a shared Windows workstation with multiple developers, per-user GCM HTTPS tokens give stronger least-privilege guarantees than per-session Pageant SSH keys, provided each developer uses a separate Windows user profile. GCM stores credentials in Windows Credential Manager which is encrypted per Windows user profile and can be scoped to fine-grained, short-lived PATs. Pageant holds a decrypted private key in memory for the whole login session and typically grants account-wide access unless server-side restrictions are applied.
Expired-credential recovery differs: GCM will re-prompt for a token and can be cleared from Credential Manager; Pageant with a revoked or expired key returns "permission denied (publickey)" with no interactive recovery prompt, requiring the user to reload or replace the key in the agent.
TortoiseGitPlink vs OpenSSH materially changes isolation. TortoiseGitPlink uses PuTTY Pageant and PuTTY .ppk keys. TortoiseGit OpenSSH uses the Windows OpenSSH ssh-agent. Both keep keys decrypted in memory, but OpenSSH integrates with the native Windows user session and standard OpenSSH key formats, making key management and per-user agent separation more predictable than Pageant.
Least-privilege is limited by the OS isolation boundary. If developers share a single Windows user profile, both Credential Manager and Pageant are shared, and neither approach provides isolation. With separate Windows profiles, GCM tokens can be scoped to repo or action and rotated per developer without affecting others. SSH deploy keys per repository are possible, but Pageant is usually loaded with a user’s personal key, giving broader access than a scoped token, and revocation is silent.
git config --global credential.helper and expect manager or manager-core.One missing diagnostic detail that changes the recommendation: are developers using separate Windows user profiles or the same Windows user account on the shared workstation? If the same OS user is shared, credential isolation cannot be achieved with either GCM or Pageant without additional controls.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.