For me the issue was that by mistake I moved the .gitconfig file from my user folder path. Recovering this file solved the issue.