When you enable WSL and install a Linux distribution, you are installing a new file system, separated from the Windows NTFS C:\ drive on your machine. The root of your file system / is the mount point of your root partition, or folder, in the case of WSL. If you want to use the GIT inside the WSL Linux system that time you facing an issue(GIT not working properly, asking for a password).

You have to check the GIT version in both Windows and Linux systems using git comment.

git --version

To set up GCM for use with a WSL distribution, open your distribution and enter this command:
If GIT installed is >= v2.39.0

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

else if GIT installed is >= v2.36.1

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

else if version is < v2.36.1 enter this command:

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

Additional configuration for Azure

If you intend to work with Azure Repos or Azure DevOps, some additional configuration is required:

git config --global credential.https://dev.azure.com.useHttpPath true

Reference: https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-git