Files
skill-git-push/skills/updating-gitea-repositories/references/windows.md
T

2.6 KiB

Windows GCM Setup

Use this reference on native Windows or Windows Subsystem for Linux (WSL).

Native Windows

In PowerShell, verify Git, GCM, and the configured helper:

git --version
git credential-manager --version
Get-Command git-credential-manager -ErrorAction SilentlyContinue
git config --show-origin --get-all credential.helper

Git for Windows is the preferred GCM installation method and includes GCM by default. If GCM is missing or broken, repair or reinstall the current Git for Windows release and keep Git Credential Manager selected. The official standalone GCM user installer is an alternative that does not require administrator rights; the system installer does.

If either version command succeeds, reuse the installed GCM. Do not reinstall Git for Windows, install standalone GCM, or upgrade GCM as part of an ordinary repository update.

After installation, start a new PowerShell session and run:

git-credential-manager --version
git-credential-manager configure
git config --global --get-all credential.helper

GCM uses Windows Credential Manager by default. If credential.helper=store is active, stop before entering a PAT and replace the plaintext helper through GCM configuration. Never edit %USERPROFILE%\.git-credentials to add a PAT.

WSL

Prefer Git for Windows plus its GCM executable. Inside WSL, configure the helper using the actual installed path, commonly:

git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/bin/git-credential-manager.exe"

A current-user standalone installer may instead place GCM under the user's AppData/Local/Programs directory. Inspect the real location rather than guessing it. GCM backed by Windows Credential Manager requires an interactive Windows desktop session and does not persist credentials from a remote SSH-only Windows session.

Authentication and Verification

At the first git ls-remote, clone, fetch, or push prompt:

  • Username: the Gitea login name or email accepted by the instance.
  • Password: the PAT with write:repository, entered locally.

Confirm the remote URL contains no credentials:

git remote -v

Do not disable TLS verification for internal certificates. Install the organization's trusted CA correctly or stop and report the certificate issue.

Official references: GCM installation, Windows credential store, and WSL configuration.