GIT credentials in WSL

17 June 2020 — Written by Almin

So for the longest time I've been ignoring the error message that my credentials are not set on Git when Pushing or Pulling a repository.

After months of tedious entering username and password of github everytime I want to do something I decided to set my credentials.


However if you think it is just like on linux, you are Wrong.

At first I've also thought that doing git config credential.helper store or setting the git username / email would be enough but no, what you have to do in the WSL is execute the following command:

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

(or wherver you path to git-credential-manager.exe is) and Voilà!

Now you never have to enter your username and password during push/pull of the code! Congratz!