How can you allow a Git in WSL use your Windows Git credentials?
Experience Level: Junior
Tags: WSL
Answer
If you have Git setup on Windows, you can use your Git credentials stored in Windows to do Git operations in Linux.
Run the following from bash:
git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/libexec/git-core/git-credential-manager.exe"
Related WSL job interview questions
How can you duplicate a WSL distro?
WSL JuniorHow can you access WSL 2 distribution from your LAN?
WSL JuniorHow do you copy output of commands in WSL to clipboard?
WSL JuniorHow can you do a backup of your WSL distro?
WSL JuniorHow can you run Windows commands from Linux?
WSL Junior