Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion WSL/basic-commands.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Basic commands for WSL
description: Reference for the basic commands included with Windows Subsystem for Linux (WSL).
ms.date: 11/28/2023
ms.date: 07/31/2025
ms.topic: article
---

Expand Down
25 changes: 8 additions & 17 deletions WSL/tutorials/wsl-git.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Get started using Git on WSL
description: Learn how to set up Git for version control on the Windows Subsystem for Linux, along with Git Credential Manager.
ms.date: 06/21/2023
ms.date: 08/22/2025
ms.topic: get-started
---

Expand Down Expand Up @@ -73,29 +73,20 @@ It is recommended to install the [latest Git for Windows](https://github.com/git

If you have a reason not to install Git for Windows, you can install GCM as a Linux application directly in your WSL distribution, but note that doing so means GCM is running as a Linux application and cannot utilize the authentication or credential storage features of the host Windows operating system. See the GCM repo for instructions on how to [configure WSL without Git for Windows](https://github.com/GitCredentialManager/git-credential-manager/blob/main/docs/wsl.md#configuring-wsl-without-git-for-windows).

To set up GCM for use with a WSL distribution, open your distribution and enter this command:
### Commands to check and set up GCM for WSL

If Git installed is >= v2.39.0
If you have installed Git for Windows, GCM is already installed and configured. You can verify this by running the following command in a WSL distribution:

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

else if Git installed is >= v2.36.1

```bash
git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/libexec/git-core/git-credential-manager.exe"
```

else if Git installed is < v2.36.1 enter this command:

```bash
git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/bin/git-credential-manager-core.exe"
```powershell
git --version; git credential-manager --version
```

> [!NOTE]
> Using GCM as a credential helper for a WSL Git installation means that any configuration set in WSL Git is NOT respected by GCM (by default). This is because GCM is running as a Windows application, and therefore will use the Git for Windows installation to query configuration. This means things like proxy settings for GCM need to be set in Git for Windows as well as WSL Git as they are stored in different files (`%UserProfile%\.gitconfig` vs `\\wsl$\distro\home\$USER\.gitconfig`). You can configure WSL so that GCM will use the WSL Git configuration, but this means that proxy settings will be unique to the specific WSL installation and not shared with others or the Windows host.

> [!WARNING]
> There is currently an [issue with using keyring in the GitHub CLI](https://github.com/cli/cli/issues/8954).

### Git with SSH

Git Credential Manager only works with HTTP(S) remotes. You can still use Git with SSH:
Expand Down